During the development of the iOS 6–core Data application, the app starts with the following exception message:
Reason = "The model used to open the store was incompatible with the one used to create the store"
the reason for the above exception is that we have modified the data model file to add a new entity, including the attribute attribute, the relationship relationship, and so on.
Workaround:
(1) The simplest way is to remove the app and run it again in an iOS 5 or 6 simulator.
(2) The second option is to use the version property of the data model:
Add a new version to the data model (that is, the managed object model):
- In the project navigation bar, select the data Model file;
- Select Editor > Create Model Version menu item;
- In the dialog box, enter the name of the data model file and click the Save button;
Then set the current version number of the Data model:
- In the project navigation bar, select the data model file;
- In the File Inspector panel window, locate the versioned Core Data Model node;
- From the pop-up menu, select the current template version number;
CoreData modified data Model error The used to open the store was incompatible with the one used to create the store