I have purchased your book (excellent, by the way) and I’m still going through it. So far, I haven’t found a way to do what I need, though. Hopefully someone can point me in the right direction. I’m an experienced developer, but new to Mac. I just don’t want to go down one path only to find out that I made some fundamental error or incorrect assumption later on.
I want to ultimately build and sell an iPhone app using Core Data. Here is what I want to be able to do:
- Build a Mac OS X utility app that points to the same Core Data object model, but has its own “master” database.
- Populate the master database using the Mac app.
- Export a subset of the master data from the Mac app to a flat file (XML?) that is a subset of the master data.
- Import that data into the local iPhone data store.
Number 2 should be easy enough. I have read about the XML Parser that should help me with #4. I need help with #1 and 3.
For #1, I can’t figure out how I can maintain one object model for both apps with Xcode. That data model must accept model versioning. Do I just create two Projects, one Mac and one iPhone, and point them both to the same .xcdatamodel file and the magic happens for me?
For #3, is there any sample code that someone can share that will iterate through an array of objects to create the XML?
Any help is appreciated!