核心数据保存模型不工作的iOS

我创build了一个核心数据模型,当试图保存logging时,我得到以下控制台消息: 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"; } 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"; }

我不知道从哪里开始debugging,请问有人可以告诉我这个问题在哪里,因为我是核心数据的新手。

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

更新:只为开发阶段做这个,一定要理解像帕特里克·戈利(Patrick Goley)所述的模型版本。