0
votes

I'm newbie and I must save "Ranking" and "Level" of user. I create file Ranking.xcdatamodel for save "Ranking" with entity name Ranking (property is Rank, Name) I can save and show it.

But when I create entity Level (property is CurrentLevel) my program is crash and show this message:

Unresolved error Error Domain=NSCocoaErrorDomain Code=134100 UserInfo=0x60044b0 "Operation could not be completed. (Cocoa error 134100.)", { metadata = { NSPersistenceFrameworkVersion = 248; NSStoreModelVersionHashes = { Users = ; }; NSStoreModelVersionHashesVersion = 3; NSStoreModelVersionIdentifiers = ( ); NSStoreType = SQLite; NSStoreUUID = "41225AD0-B508-4AA7-A5E2-15D6990FF5E7"; "_NSAutoVacuumLevel" = 2; }; reason = "The model used to open the store is incompatible with the one used to create the store"; }

I don't know how to save "Level" please suggest me.

1

1 Answers

2
votes

The problem is you have saved data based on one model, then changed that model and tried to re-open the same file.

You need to delete the saved file which will be (I think, from top of my head) in the ~/user/Library/ApplciationSupport/YourAppName directory, unless you are developing a document based application.

Then re-run your application and re-enter and re-save your data.