在iOS 6 – Core Data 应用程序的开发过程中, App启动时出现如下异常信息:

reason = “The model used to open the store is incompatible with the one used to create the store”

出现上述异常的原因是 :我们修改了Data Model文件,增加了新的Entity,包括Attribute属性、Relationship关系等等。

解决办法:

(1) 最简单的办法是,在iOS 5 或者 6的模拟器中,删除App,然后重新运行就可以了。

(2) 第二种办法是使用Data Model 数据模型的版本属性:

给Data Model(也就是被管理对象模型)添加一个新的版本:

  1. 在项目导航栏中,选择Data Model 文件;
  2. 选择 Editor > Create Model Version 菜单项;
  3. 在对话框中,输入Data Model文件的名称,并点击Save按钮;

然后设置 Data Model的当前版本号:

  1. 在项目导航栏中,选择Data Model文件;
  2. 在File inspector 面板窗口,找到Versioned Core Data Model 节点;
  3. 从弹出菜单中,选择当前模板版本号;

CoreData修改了数据模型报错 The model used to open the store is incompatible with the one used to create the store的更多相关文章

  1. iOS/Xcode异常:reason = “The model used to open the store is incompatible with the one used to create the store”

    reason=The model used to open the store is incompatible with the one used to create the store 出现上述异常 ...

  2. The model used to open the store is incompatible with the one used to create the store

    说什么数据不兼容,,,,这时删除模拟器的应用,,,重新启动测试.

  3. location修改的时候报错解决办法

    location修改的时候直接保存record,或者转换成DbObject都会报错,这样准换之后就好了if(key.equals("location")&&valu ...

  4. mysql5.7.18.1修改用户密码报错ERROR 1054 (42S22): Unknown column 'password' in 'field list'解决办法

    本意向修改一个用户的密码,网上搜到的命令为如下 mysql> update user set password=password(“新密码”) where user=”用户名”; 执行后报错 E ...

  5. YII2修改backend模块报错An Error occurred while handling another error: exception 'yii\base\InvalidRouteException' with message 'Unable to resolve the request "site/error".' in E:\project\demo\vendor\yiisoft

    报错内容: 原因:没有修改common/config/bootstrap.php里的别名 修改后:

  6. mysql 中modify和change区别(以及使用modify修改字段名称报错)

    使用modify修改字段报错如下: mysql> alter table student modify name sname char(16);ERROR 1064 (42000): You h ...

  7. Oracle修改字段类型报错:“ORA-01439:要更改数据类型,则要修改的列必须为空”

    在oracle修改user表字段name类型时遇到报错:“ORA-01439:要更改数据类型,则要修改的列必须为空”,是因为要修改字段的新类型和原来的类型不兼容. 如果要修改的字段数据为空时,则不会报 ...

  8. linux系统修改用户密码报错

    版权声明:本文为博主原创文章,支持原创,转载请附上原文出处链接和本声明. 本文地址:https://www.cnblogs.com/wannengachao/p/12069113.html 1.设置新 ...

  9. django配置mysql报错 no model named "MySQLdb"

    官网上面连接mysql数据库的参数很少,入了不少坑,一直排错和检查参数都没有问题,只能manage.py mirgrate 更新数据库的信息创建数据库的表. 很是郁闷.报了一大堆的错误,大概意思就是说 ...

随机推荐

  1. ZOJ 3874 Permutation Graph 分治NTT

    Permutation Graph Time Limit: 2 Seconds      Memory Limit: 65536 KB Edward has a permutation {a1, a2 ...

  2. HashMap随机取值和迭代器取值的对比

    一共四中方法,前两种是迭代器取值,后两种是随机取值,循环了5000万次,时间分别为:迭代器读取的速度大约是随机读取的速度的1.5倍,数据量越大,差距越明显. 另外,插入是读取的100倍左右的时间(这个 ...

  3. 用 querySelectorAll 来查询 DOM 节点

    用 querySelectorAll 来查询 DOM 节点 Document.querySelectorAll - Web API 接口 | MDN https://developer.mozilla ...

  4. Java,如何获取文件的MD5值

    MessageDigest类封装得很不错,简单易用 不多说,直接上代码 import java.io.FileInputStream;import java.security.MessageDiges ...

  5. iOS 设置TextView控件内容行间距

    - (BOOL)textViewShouldBeginEditing:(UITextView *)textView { if (textView.text.length < 1) { textV ...

  6. 安装mysql 8.0版本时,使用front连接报1251错误或者navicat 连接报错2059解决方案

    这个错误出现的原因是在mysql8之前的版本中加密规则为mysql_native_password,而在mysql8以后的加密规则为caching_sha2_password. 解决此问题有两种方法, ...

  7. SpringBoot启动跟踪

    程序启动入口 @SpringBootApplication public class Chapter001Application { public static void main(String[] ...

  8. POJ3087 Shuffle'm Up —— 打表找规律 / map判重

    题目链接:http://poj.org/problem?id=3087 Shuffle'm Up Time Limit: 1000MS   Memory Limit: 65536K Total Sub ...

  9. 使用TextView实现跑马灯的效果

    1.定义textView标签的4个属性: android:singleLine="true"//使其只能单行 android:ellipsize="marquee&quo ...

  10. lucene 5的测试程序——API变动太大

    package hello; import java.io.BufferedReader; import java.io.File; import java.io.FileReader; import ...