核心数据保存模型无法运行iOS

时间:2013-12-04 23:32:27

标签: ios core-data console nsmanagedobjectmodel

我创建了一个核心数据模型,在尝试保存记录时,我收到以下控制台消息: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"; }

我不知道从哪里开始调试它请有人告诉我问题可能在哪里,因为我是核心数据的新手。

1 个答案:

答案 0 :(得分:1)

从模拟器或设备中删除您的应用,清理项目并再次运行。

更新: 仅在开发阶段执行此操作,并确保理解像Patrick Goley所述的模型版本。