The Background
NSMigratePersistentStoresAutomaticallyOption
key as [NSNumber
numberWithBool:YES]
when adding the
Persistent Store. modelByMergingModels:
The Problem
No matter what I do to migrate, I get the error message:
"Persistent store migration failed, missing source managed object model."
What I've Tried
I'm at my wits end.
I can't help but think I've made a huge mistake somewhere that I'm not seeing. Any ideas?
Two possibilities:
Turn on Core Data debugging and you should be able to see the hashes that Core Data is looking for when it is doing the migration. Compare these hashes to what is in your store on disk and see if they match up. Likewise the debugging should let you see the hashes in the mapping model to help you match everything up.
If it is just your mapping model that is misaligned, you can tell it to update from source from the design menu in Xcode. If you are missing the actual source model for your store file on disk then you can look in your version control system or try using an automatic migration to get that file to migrate to the model that you believe is the source.
The location for changing the source and destination models has moved to the bottom of the editor window: