According to the Apple Core Data Tutorial, in order to use Core Data you have to:
In the Options section, select the switch to use Core Data for storage.
How do it for an existing project? Do you have to import some files? Can that setting be activated later on?
Thanks
Selecting that option automatically adds the CoreData.framework, an empty data model, and a little bit of Core Data code to the AppDelegate and View Controllers classes.
If you want to start using CoreData in your existing project;
1) Add CoreData.framework to the project.
2) Do "New File", go to "Resource", and add a new "Data Model" to the project.
3) Create a temporary new project (check that use Core Data box). Then, you can look and see the Core Data-related code that it added to those template files. Carefully merge that stuff into your existing AppDelegate.
4) You should be all set to pick up the tutorial from that point.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With