简体   繁体   中英

Implement CoreData in existing project (XCode 4.2)

I have a very simple (beginner) application to which I want to add persistence. Using XCode 4.2 when I created the Project there was no "Use CoreData option" so now that I have my views and everything set up I can't find a way to add the CoreData Framework.

I've been reading and most places say that if you don't select "use CoreData" you will be missing very important code in your project so I'm even wondering if it is possible to implement it now that my project is advanced...

I appreciate your help!

For starters, why don't you create a new project, select the "Use Core Data" box, and take a look at the code in that app? The "important code" mostly just relates to setting up the managed object context, model, and persistent store coordinator. You'll learn something by looking at the code in that new project, and you'll probably see how to add the necessary code to your existing project.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM