LoginSignup
7
5

More than 5 years have passed since last update.

CoreDataでエンティティを追加したりした場合のエラー

Posted at
2012-09-25 14:18:19.958 myapp[75929:c07] CoreData: annotation: Disconnecting from sqlite database.
2012-09-25 14:18:19.965 myapp[75929:c07] Unresolved error Error Domain=NSCocoaErrorDomain Code=134100 "The operation couldn’t be completed. (Cocoa error 134100.)" UserInfo=0x84919f0 {metadata={
    NSPersistenceFrameworkVersion = 419;
    NSStoreModelVersionHashes =     {
        Event = <5431c046 d30e7f32 c2cc8099 58add1e7 579ad104 a3aa8fc4 846e97d7 af01cc79>;
    };
    NSStoreModelVersionHashesVersion = 3;
    NSStoreModelVersionIdentifiers =     (
        ""
    );
    NSStoreType = SQLite;
    NSStoreUUID = "747B9678-345F-4E93-A8FB-B68855B70A1B";
    "_NSAutoVacuumLevel" = 2;
}, reason=The model used to open the store is incompatible with the one used to create the store}, {
    metadata =     {
        NSPersistenceFrameworkVersion = 419;
        NSStoreModelVersionHashes =         {
            Event = <5431c046 d30e7f32 c2cc8099 58add1e7 579ad104 a3aa8fc4 846e97d7 af01cc79>;
        };
        NSStoreModelVersionHashesVersion = 3;
        NSStoreModelVersionIdentifiers =         (
            ""
        );
        NSStoreType = SQLite;
        NSStoreUUID = "747B9678-345F-4E93-A8FB-B68855B70A1B";
        "_NSAutoVacuumLevel" = 2;
    };
    reason = "The model used to open the store is incompatible with the one used to create the store";
}

こんなんが出た。 DBのスキーマが変更された場合にはそれに対応する処理を行わないといけないが、それをしていない事に対するエラー。とりあえず動かしたいならアプリを一度削除すればデータが消えるのでエラーの回避は可能。最初のリリースまではこの対応でも良いかもしれない。未保証。

7
5
1

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
7
5