CoreData modified data Model error The used to open the store was incompatible with the one used to create the store

Source: Internet
Author: User

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):

  1. In the project navigation bar, select the data Model file;
  2. Select Editor > Create Model Version menu item;
  3. 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:

  1. In the project navigation bar, select the data model file;
  2. In the File Inspector panel window, locate the versioned Core Data Model node;
  3. 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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.