How do you migrate Core Data?
Essence
A migration is needed when the NSManagedObjectModel changes while devices already have stores of the old version. Core Data stores the model's hash in the file and compares it with the current model on open; if they differ it either migrates or fails with NSPersistentStoreIncompatibleVersionHashError. The rule: never edit the current model version in production — add a new version (Editor → Add Model Version) and make it current.
The rest of this answer, with code and interview follow-ups, is in the DevPrep app.
Read the full answer in DevPrep