Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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!

like image 201
Chamanhm Avatar asked Mar 03 '26 14:03

Chamanhm


1 Answers

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.

like image 152
Caleb Avatar answered Mar 06 '26 05:03

Caleb



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!