Just a small clarification on Core Data Lightweight Migration before 1st app release

80 Views Asked by At

I'm (hopefully) close to releasing my first app which uses Core Data. Now I've read all of the articles and posts regarding lightweight migration and it makes sense. The only question I had is, do I have to do anything before I ship the app?

My understanding is, after I release, if I want to change anything in the model, I set up a second model object with the NSMigratePersistentSToreAutomaticallyOptio and NSInferMappingModelAUtomatiallyOption in the App Delegate.

Do I have to do anything else before I release the first version of my app?

Thanks,

1

There are 1 best solutions below

3
On BEST ANSWER

You will need to create a second version of the object model (i.e. the Core Data graph, which you do in Xcode rather than in code) if you want to make any modifications, and set up your persistent store object using the method described here. Provided that you aren't making very complex changes to the data model or moving to a new model this will usually just work.