Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

doanelinde

macrumors member
Original poster
Jul 24, 2009
35
0
When you create a new project you have the option to tick
"Use Coredata for storage?"

If I didn't tick that when I created my project, is there a way to go back and do that afterwards somehow?!
 
You don't need to click it, it just provides a template for using CoreData by (presumably) adding the relevant frameworks and some start method 'stubs' to guide you through the basics of what you need to implement.

If you want to implement it halfway through, why don't you start a new project with it ticked just as a guide, and then copy the relevant methods stubs from there into your existing project? Then, make sure you have added the correct framework references to your existing project and you should be good to go.

I often do this with other files, e.g. I use a view controller for my table views (because I hate the inflexibility of UITableViewController) but then I copy and paste the stub methods for the datasource and delegate into my existing project from a temporary new 'sample' file.
 
Oh cool, that's a good way of doing things actually.

Cool, I was just worried that it was setting up some background stuff that I'd be missing if I didn't do it or something, good to know.
 
Hmmm, it also adds the .xcdatamodel file for anyone else interested...


Which is easy enough to do yourself, under newfile>rescourse
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.