We have an app that is currently in the app store. It uses Core Data as its persistence mechanism. We have a new version ready to go, and it has some schema changes. Specifically, we have added 1 new entity and added a new attribute to an existing entity. From my understanding and reading, this is one of the most simple migrations that can occur. There are no field deletions, and no relationships to change. The data model consists of 5 entities with no relationships at all.
We have versioned the data model, and created an .xcmappingmodel to handle the migration. We are handling the migration by adding the following options to the creation of the PersistentStoreCoordinator:
NSDictionary *options = [NSDictionary dictionaryWithObjectsAndKeys:
[NSNumber numberWithBool:YES], NSMigratePersistentStoresAutomaticallyOption, nil];
Currently, we have tested successfully with several members of the team using the following process:
- Delete all test versions of the app from the device and from iTunes
- Go to the app store and download the current version
- Make some changes to the app that will prove the migration was successful
- Drag the new binary (signed with the same bundle identifier) into iTunes and sync
- Load the new version on the device, verify that the changes made in the previous version are still present, and that the app does not crash
My question is this: Is there an easier/better way to test this? Our concern is that once the app goes out the door, there is no other way to ensure our users have the best experience possible.