CoreDataErrorThe model used to open the store is incompatible with the one used to create the store

  1. You created some entities with some attributes and wrote some code
  2. Launched the app, probably added some content
  3. Quit the app and added/changed some more entities with attributes
  4. You probably launched the app again and now it's giving you the error

The reason for this is because your new managed object model is trying to use older version of storage (the one first time created when you launched the app).

The quick and dirty fix would be to remove the storage file (somewhere in ~/Library/Application Support/YOUR_APP/) and to launch your app again.

For future reference - if you release an app and in next release the app has changed managed object model - you have to write migrations for it. All this and more is covered in core data programming cookbook in apple documentation.

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值