I have read the documentation about automatic /lightweight migration for Core Data models - but I am having problems implementing it.
As I understand it the applicat
Grouchal's answer is perfect...but if you are still having the "Can't merge models with two different entities xxx" even after cleaning up the build several times...Your might have issues with how the managedObjectModel is being loaded...take at look at this one...which helped me fix it..
core data migration problems
iOS 4.0+
NSURL *modelURL = [[NSBundle mainBundle] URLForResource:@"model" withExtension:@"momd"];
managedObjectModel = [[NSManagedObjectModel alloc] initWithContentsOfURL:modelURL];
Minor edit to @Grouchal's awesome instructions above for Xcode version 5:
Old: 2. Select the Design Menu at the top - then Data Model - then choose Add Model Version
Version 5+: 2. Select the Editor menu, then Add Model Version…, type your Version name and Based on model (select your original model from the list)
This was incredibly helpful. The Apple documentation was -- as usual -- woefully incomplete. I recommend doing a clean build, as I ran into an error "Can't merge models with two different entities xxx" when I first ran after making these changes. The clean build fixed it up.