Daily iOS
Persistence

Core Data migration

You shipped an update to a Core Data app and crash reports are pouring in. The log says "The model used to open the store is incompatible with the one used to create the store." What happened?

How would an interviewer hear this answer? You'll see whether they'd move on, dig in, or say no, and which sentences would trip you up. Your score doesn't change.
See the short answer

The model changed without a new model version, so the model hash in the store metadata no longer matches the current model and the store won't open. Deleting the store stops the crash and throws the data away.

Share a question