TAILIEUCHUNG - Phát triển ứng dụng cho iPhone và iPad - part 17

Tham khảo tài liệu 'phát triển ứng dụng cho iphone và ipad - part 17', công nghệ thông tin, kỹ thuật lập trình phục vụ nhu cầu học tập, nghiên cứu và làm việc hiệu quả | Using Core Data A Simple Task Manager 129 initWithManagedObjectModel self managedObjectModel if persistentStoreCoordinator addPersistentStoreWithType NSSQLiteStoreType configuration nil URL storeUrl options nil error error Replace this implementation with code to handle the error appropriately. abort causes the application to generate a crash log and terminate. You should not use this function in a shipping application although it may be useful during development. If it is not possible to recover from the error display an alert panel that instructs the user to quit the application by pressing the Home button. Typical reasons for an error here include The persistent store is not accessible The schema for the persistent store is incompatible with current managed object model Check the error message to determine what the actual problem was. NSLog @ Unresolved error @ @ error error userinfo abort return persistentStoreCoordinator The code first determines if the Persistent Store Coordinator already exists. If it exists the method returns it to you. If the coordinator does not exist the code must create it. In order to create the coordinator you need to pass in a URL that points to the data store. The template uses the fileURLWithPath method on the NSURL class to create the URL. You can see that the store name will be . Next the code allocates an NSError object to hold the error data that the Persistent Store Coordinator generates if there is a problem configuring the coordinator. The next line allocates and initializes the coordinator using the Managed Object Model. You will look at the managedObjectModel getter method in a moment. Remember that you use the Persistent Store Coordinator to mediate between the Managed Object Context the Managed Object Model and the data store. Therefore it makes sense that the coordinator would need to have a reference to the model. Now that the coordinator knows about the model the code goes on to tell it

TAILIEUCHUNG - Chia sẻ tài liệu không giới hạn
Địa chỉ : 444 Hoang Hoa Tham, Hanoi, Viet Nam
Website : tailieuchung.com
Email : tailieuchung20@gmail.com
Tailieuchung.com là thư viện tài liệu trực tuyến, nơi chia sẽ trao đổi hàng triệu tài liệu như luận văn đồ án, sách, giáo trình, đề thi.
Chúng tôi không chịu trách nhiệm liên quan đến các vấn đề bản quyền nội dung tài liệu được thành viên tự nguyện đăng tải lên, nếu phát hiện thấy tài liệu xấu hoặc tài liệu có bản quyền xin hãy email cho chúng tôi.
Đã phát hiện trình chặn quảng cáo AdBlock
Trang web này phụ thuộc vào doanh thu từ số lần hiển thị quảng cáo để tồn tại. Vui lòng tắt trình chặn quảng cáo của bạn hoặc tạm dừng tính năng chặn quảng cáo cho trang web này.