0

I am getting this error while adding pre-populated data in new project in Xcode .

Unresolved error Error Domain=NSCocoaErrorDomain Code=134100 "The operation couldn’t be completed. (Cocoa error 134100.)" UserInfo=0x8936000 {metadata={
    NSPersistenceFrameworkVersion = 407;
    NSStoreModelVersionHashes =     {
        Cleaner = <bb90421c 1d099882 3b9c4615 f58bb6d2 b9f1e567 c98e868e 5f467f7c d34be700>;
        Location = <7f9bec7a 3e3692f8 ca426545 7239c5c8 ea704142 8614e1fd 7681eaaf 5dbb1586>;
        LocationRoomMap = <f1052409 bfe4fb62 b7c45b85 2f34ab74 109c09df 07bc69ff a1a130bc 3dd23ced>;
        Login = <39315a04 8bf4a9f5 e1fd123d 41854f3c 8891af2b ddffdb43 2fa32209 574af392>;
        Room = <d07972d5 5b089bdd 2fa7afde f723f5a8 abb7548d 9cfe9fc6 bb343b9d 3094d12e>;
        TestPlan = <e47ccac2 197bd2a1 41e295b2 66fcc993 1671b53d 88b90334 3942dab4 1eed766e>;
        TestPoint = <e6806bd5 bba33811 c55ea3cd 8d8e0c89 9a8742f2 5c7b19f9 d285b7d2 ae5eab96>;
    };
    NSStoreModelVersionHashesVersion = 3;
    NSStoreModelVersionIdentifiers =     (
        ""
    );
    NSStoreType = SQLite;
    NSStoreUUID = "3D9D9EB1-5ED3-47DB-8B76-F6E4051B435E";
    "_NSAutoVacuumLevel" = 2;
}, reason=The model used to open the store is incompatible with the one used to create the store}, {
    metadata =     {
        NSPersistenceFrameworkVersion = 407;
        NSStoreModelVersionHashes =         {
            Cleaner = <bb90421c 1d099882 3b9c4615 f58bb6d2 b9f1e567 c98e868e 5f467f7c d34be700>;
            Location = <7f9bec7a 3e3692f8 ca426545 7239c5c8 ea704142 8614e1fd 7681eaaf 5dbb1586>;
            LocationRoomMap = <f1052409 bfe4fb62 b7c45b85 2f34ab74 109c09df 07bc69ff a1a130bc 3dd23ced>;
            Login = <39315a04 8bf4a9f5 e1fd123d 41854f3c 8891af2b ddffdb43 2fa32209 574af392>;
            Room = <d07972d5 5b089bdd 2fa7afde f723f5a8 abb7548d 9cfe9fc6 bb343b9d 3094d12e>;
            TestPlan = <e47ccac2 197bd2a1 41e295b2 66fcc993 1671b53d 88b90334 3942dab4 1eed766e>;
            TestPoint = <e6806bd5 bba33811 c55ea3cd 8d8e0c89 9a8742f2 5c7b19f9 d285b7d2 ae5eab96>;
        };
        NSStoreModelVersionHashesVersion = 3;
        NSStoreModelVersionIdentifiers =         (
            ""
        );
        NSStoreType = SQLite;
        NSStoreUUID = "3D9D9EB1-5ED3-47DB-8B76-F6E4051B435E";
        "_NSAutoVacuumLevel" = 2;
    };
    reason = "The model used to open the store is incompatible with the one used to create the store";
}

I tried ... resetting content and settings .. model versioning of the data model .. but not worked... however if there is only one entity is there then there isnt any error like this .this error comes up when there is more than one entity.

Jean-Luc Godard
  • 1,873
  • 3
  • 28
  • 53

1 Answers1

2

I had a similar problem (not the exact same one though) which was caused by me making a change to the model after the SQLite database file had been created. I had to delete the SQLite database from the Debug folder (which should be created where your application is compiled to) and then build the application again. A new SQLite database was created with my updated model. Hope that makes sense and is of some help.

Updated:

this and other suggested solutions can be found elsewhere on stackoverflow:

The model used to open the store is incompatible with the one used to create the store

Community
  • 1
  • 1
cullener
  • 103
  • 1
  • 10
  • Hey cullener ... I am running this app in iphone simulator .. can you please tell me where this folder [Debug folder (which should be created where your application is compiled to)] is ? – Jean-Luc Godard Feb 28 '14 at 00:52
  • do you mean the folder in library where the app is crated ? I tried that one to .. I deleted it .. even from the trash , but it dint work – Jean-Luc Godard Feb 28 '14 at 00:54
  • have a look in /Library/Developer/Xcode/DerivedData for a folder that starts with the name of your application. check in there to see if there's an older version of your SQLite database – cullener Feb 28 '14 at 01:07
  • are you sure that the entities in your model match your database exactly? – cullener Feb 28 '14 at 01:30
  • yes it does..however there is a huge list of entity there .. let me make it again .. will get back to you after doing it .. – Jean-Luc Godard Feb 28 '14 at 01:31
  • clean your project after making the entity again – cullener Feb 28 '14 at 01:41