Sunday, December 7, 2014

CoreData data model migration

This morning I came across the issue when i needed to modify slightly the data model in the iPhone application, but when i tried to run the app in the emulator the app bombed out with the following error: "The model used to open the store is incompatible with the one used to create the store".

So the core data recognised that model has changed and failed to create managed context.

A quick search in Google brought me to this article that explains how to deal with such issues when the changes to the mode qualify for so called "light migration".