Sunday, December 14, 2014

Core Data Migration:


1. Create a new version of the core data.
2. Add/Update the changes in the new core data model.
3. Set the new core data model as active in xcode.
4. Add the following options dictionary to the Persistance store in AppDelegate.

  NSDictionary *options = [NSDictionary dictionaryWithObjectsAndKeys:
                           [NSNumber numberWithBool:YES], NSMigratePersistentStoresAutomaticallyOption,
                           [NSNumber numberWithBool:YES], NSInferMappingModelAutomaticallyOption,  nil];

No comments: