开发者

Switch to use Core Data during development?

I decided to switch to use Core Data to save all the data in my navigation application. What are the steps necessary to make Core Data available in my application?

I don't want to start a new project with the check box 'Use Core Data for my application' and copy all the existing codes to the new pr开发者_StackOverflow社区oject.

Anybody has any guides or tutorial?

Thanks,


You need a CoreData stack consisting of:

  1. NSPersistentStoreCoordinator

  2. NSManagedObjectModel

  3. NSManagedObjectContext

The easiest is probably to create a dummy project with CoreData enabled and then to copy the stack from the App-Delegate to your project. Don't forget to link in the CoreData Framework.


Similar question here with answer: Adding Core Data To My iPhone App

Also here is the link to Apple's Core Data Tutorial As a side note you don't have to use Core Data, you can use SQL Lite, I have found it to be a little easier starting out if you are all ready familiar with the basics of SQL.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜