suisied
suisied

Reputation: 426

xcdatamodeld do I have to fill all attributes

xcdatamodeld do I have to fill all attributes in the entity? every time I play with core data, trying to insert images paths and strings, It crashes when I insert strings, please help, error below.

returned error Error Domain=NSCocoaErrorDomain Code=134100 "The operation couldn’t be completed. (Cocoa error 134100.)" UserInfo=0x7fac334193f0 {metadata={
        NSPersistenceFrameworkVersion = 519;
        NSStoreModelVersionHashes =     {
            Entity = <e4d98363 c5118882 22f0534c 6b38c82e 013fbea8 b50048e4 337fa5ba dfebd41e>;
        };
        NSStoreModelVersionHashesVersion = 3;
        NSStoreModelVersionIdentifiers =     (
            ""
        );
        NSStoreType = SQLite;
        NSStoreUUID = "E509F0EC-384B-48BB-954F-81379074917B";
        "_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 =         {
                Entity = <e4d98363 c5118882 22f0534c 6b38c82e 013fbea8 b50048e4 337fa5ba dfebd41e>;
            };
            NSStoreModelVersionHashesVersion = 3;
            NSStoreModelVersionIdentifiers =         (
                ""
            );
            NSStoreType = SQLite;
            NSStoreUUID = "E509F0EC-384B-48BB-954F-81379074917B";
            "_NSAutoVacuumLevel" = 2;
        };
        reason = "The model used to open the store is incompatible with the one used to create the store"; } 2015-02-01 22:35:05.476 test[17368:543208] Unresolved error Optional(Error Domain=YOUR_ERROR_DOMAIN Code=9999 "Failed to initialize the application's saved data" UserInfo=0x7fac3419d060 {NSLocalizedFailureReason=There was an error creating or loading the application's saved data., NSLocalizedDescription=Failed to initialize the application's saved data, NSUnderlyingError=0x7fac33419440 "The operation couldn’t be completed. (Cocoa error 134100.)"}), Optional([NSLocalizedFailureReason: There was an error creating or loading the application's saved data., 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=0x7fac334193f0 {metadata={
        NSPersistenceFrameworkVersion = 519;
        NSStoreModelVersionHashes =     {
            Entity = <e4d98363 c5118882 22f0534c 6b38c82e 013fbea8 b50048e4 337fa5ba dfebd41e>;
        };
        NSStoreModelVersionHashesVersion = 3;
        NSStoreModelVersionIdentifiers =     (
            ""
        );
        NSStoreType = SQLite;
        NSStoreUUID = "E509F0EC-384B-48BB-954F-81379074917B";
        "_NSAutoVacuumLevel" = 2; }, reason=The model used to open the store is incompatible with the one used to create the store}])

Upvotes: 0

Views: 115

Answers (1)

LastMove
LastMove

Reputation: 2482

your error is: The model used to open the store is incompatible with the one used to create the store. When you update the Core Data Model. (By adding new attributes or new entities etc), Core Data have to "migrate" the olds datas, to the new Models.

But the simple solution is to delete the application (from the simulator or device) And to run it again, each time you modify the model.

Upvotes: 1

Related Questions