【发布时间】:2013-12-21 16:57:49
【问题描述】:
我创建了一个核心数据模型,在尝试保存记录时,我收到以下控制台消息:Unresolved error Error Domain=NSCocoaErrorDomain Code=134100 "The operation couldn’t be completed. (Cocoa error 134100.)" UserInfo=0x8b3bc50 {metadata={
NSPersistenceFrameworkVersion = 479;
NSStoreModelVersionHashes = {
};
NSStoreModelVersionHashesVersion = 3;
NSStoreModelVersionIdentifiers = (
""
);
NSStoreType = SQLite;
NSStoreUUID = "F49C0E04-9778-46EC-A9C7-9A045CD915D8";
"_NSAutoVacuumLevel" = 2;
}, reason=The model used to open the store is incompatible with the one used to create the store}, {
metadata = {
NSPersistenceFrameworkVersion = 479;
NSStoreModelVersionHashes = {
};
NSStoreModelVersionHashesVersion = 3;
NSStoreModelVersionIdentifiers = (
""
);
NSStoreType = SQLite;
NSStoreUUID = "F49C0E04-9778-46EC-A9C7-9A045CD915D8";
"_NSAutoVacuumLevel" = 2;
};
reason = "The model used to open the store is incompatible with the one used to create the store";
}
我不知道从哪里开始调试它,请有人告诉我问题可能出在哪里,因为我是核心数据的新手。
【问题讨论】:
-
您是否对模型进行了更改?任何时候更改模型,都需要从模拟器或iphone中删除应用,然后重新运行
-
错误给你这个解释:
The model used to open the store is incompatible with the one used to create the store -
在此处查看我的答案,您需要针对您对其所做的每组更改对您的核心数据模型进行版本控制。 stackoverflow.com/questions/20364660/…
标签: ios core-data console nsmanagedobjectmodel