Xcode - 模拟器在 iPad(但不是 iPhone)访问 CoreData 时出错

Xcode - error in simulator on iPad (but not iPhone) accessing CoreData

我的应用程序在模拟 iPad 时失败并出现 DataCore 错误 9999,但在模拟 iPhone 时却没有。当我 运行 上的应用程序 iPad 没有错误。

模拟器在我的桌面上使用相同的数据库,我已经重建了好几次。

这是模拟器中的错误吗?

这是错误代码:

2015-08-16 12:07:19.750 CREW Emergency Preparedness[1195:59803] CoreData: error: -addPersistentStoreWithType:SQLite configuration:(null) URL:file:///Users/patriciawarwick/Library/Developer/CoreSimulator/Devices/A1F21642-DA91-4510-9517-FC2A2756FF26/data/Containers/Data/Application/65B75062-9C98-42AA-954F-25EEC7CAA8BC/Documents/CREWData.sqlite options:(null) ... returned error Error Domain=NSCocoaErrorDomain Code=134100 "The operation couldn’t be completed. (Cocoa error 134100.)" UserInfo=0x7c4cb030 {metadata={
NSPersistenceFrameworkVersion = 519;
NSStoreModelVersionHashes =     {
    Notes = <cdf25e0b 15955be0 b8714aa0 675ddcb3 caa5de75 7f257d1a ca6a64e3 97791f2a>;
    Section = <78490b89 a642322e 42bbdceb 4bb3f099 6331bf84 7db3c909 cfd99469 3f3954b5>;
    Switch = <3fff52c1 6964f42e 7c8d7298 13c8cc76 8f676a2b 32a6b00f 872effa1 fb12c1bc>;
    Tips = <1946e123 3376ba49 c56b4d8d 01d1b5a7 fdec6cc0 0f632339 0f60618b 4eee6851>;
    View = <c1c09b2c 4d0cbeca 4c4b347e 5df34739 8c88d1a2 c84f1e97 f7ae7fea 5c777ab9>;
};
NSStoreModelVersionHashesVersion = 3;
NSStoreModelVersionIdentifiers =     (
    ""
);
NSStoreType = SQLite;
NSStoreUUID = "D4450E7A-343A-4DBA-9A45-71201155E63E";
"_NSAutoVacuumLevel" = 2;
}, reason=The model used to open the store is incompatible with the one used to create the store} with userInfo dictionary {
metadata =     {
    NSPersistenceFrameworkVersion = 519;
    NSStoreModelVersionHashes =         {
        Notes = <cdf25e0b 15955be0 b8714aa0 675ddcb3 caa5de75 7f257d1a ca6a64e3 97791f2a>;
        Section = <78490b89 a642322e 42bbdceb 4bb3f099 6331bf84 7db3c909 cfd99469 3f3954b5>;
        Switch = <3fff52c1 6964f42e 7c8d7298 13c8cc76 8f676a2b 32a6b00f 872effa1 fb12c1bc>;
        Tips = <1946e123 3376ba49 c56b4d8d 01d1b5a7 fdec6cc0 0f632339 0f60618b 4eee6851>;
        View = <c1c09b2c 4d0cbeca 4c4b347e 5df34739 8c88d1a2 c84f1e97 f7ae7fea 5c777ab9>;
    };
    NSStoreModelVersionHashesVersion = 3;
    NSStoreModelVersionIdentifiers =         (
        ""
    );
    NSStoreType = SQLite;
    NSStoreUUID = "D4450E7A-343A-4DBA-9A45-71201155E63E";
    "_NSAutoVacuumLevel" = 2;
};
reason = "The model used to open the store is incompatible with the one used to create the store";
 }
 2015-08-16 12:07:19.751 CREW Emergency Preparedness[1195:59803] Unresolved error Optional(Error Domain=YOUR_ERROR_DOMAIN Code=9999 "Failed to initialize the application's saved data" UserInfo=0x7c17c300 {NSLocalizedDescription=Failed to initialize the application's saved data, NSUnderlyingError=0x7c4cb050 "The operation couldn’t be completed. (Cocoa error 134100.)", NSLocalizedFailureReason=There was an error creating or loading the application's saved data.}), Optional([NSLocalizedDescription: Failed to initialize the application's saved data, NSUnderlyingError: Error Domain=NSCocoaErrorDomain Code=134100 "The operation couldn’t be completed. (Cocoa error 134100.)" UserInfo=0x7c4cb030 {metadata={
NSPersistenceFrameworkVersion = 519;
NSStoreModelVersionHashes =     {
    Notes = <cdf25e0b 15955be0 b8714aa0 675ddcb3 caa5de75 7f257d1a ca6a64e3 97791f2a>;
    Section = <78490b89 a642322e 42bbdceb 4bb3f099 6331bf84 7db3c909 cfd99469 3f3954b5>;
    Switch = <3fff52c1 6964f42e 7c8d7298 13c8cc76 8f676a2b 32a6b00f 872effa1 fb12c1bc>;
    Tips = <1946e123 3376ba49 c56b4d8d 01d1b5a7 fdec6cc0 0f632339 0f60618b 4eee6851>;
    View = <c1c09b2c 4d0cbeca 4c4b347e 5df34739 8c88d1a2 c84f1e97 f7ae7fea 5c777ab9>;
};
NSStoreModelVersionHashesVersion = 3;
NSStoreModelVersionIdentifiers =     (
    ""
);
NSStoreType = SQLite;
NSStoreUUID = "D4450E7A-343A-4DBA-9A45-71201155E63E";
"_NSAutoVacuumLevel" = 2;
}, reason=The model used to open the store is incompatible with the one used to create the store}, NSLocalizedFailureReason: There was an error creating or loading the application's saved data.]) 

从 iPad 模拟器中删除应用程序或重置模拟器。这通常会在开发工作流程中解决此类问题。