0

我发生了崩溃,在我的控制台中我收到了这个错误:

Unresolved error Error Domain=NSCocoaErrorDomain Code=134100 "The operation couldn’t be completed. (Cocoa error 134100.)" UserInfo=0x6d30540 {metadata=<CFBasicHash 0x6d2c680 [0x171bb38]>{type = immutable dict, count = 7,
entries =>
.....
.....

reason = "The model used to open the store is incompatible with the one used to create the store";

您看到原因了吗,很抱歉我是 Core Data 的新手。谢谢

4

2 回答 2

1

删除设备上的应用程序,通过 Organizer 删除派生数据并再次部署。当您更改核心数据模型并在设备上留下旧版本时,您会收到此错误。因此,在核心数据模型发生更改后,每次构建时都需要删除设备上的当前构建。

更多信息可以在Core Data Model Versioning and Data Migration Programming Guide中找到。

于 2012-04-26T14:22:14.460 回答
0

看起来您更改了数据模型而没有更新数据库本身。如果您有一个预填充的数据库,那么它与您的模型不匹配。如果您不这样做,则需要进行全新安装以创建新数据库。

于 2012-04-26T14:25:50.263 回答