开发者

Implement CoreData in existing project (XCode 4.2)

开发者 https://www.devze.com 2023-03-14 02:42 出处:网络
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 everythi

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.

0

精彩评论

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