Reputation: 2671
I have an entity in my data model, after I added an additional entity the app crashes when i try to acces it.
var request = NSFetchRequest(entityName: "Entity");
var results=context.executeFetchRequest(request, error: nil);
Even if there is no items stored in it, it still crashes. If i delete the app and try again it does not crash.
Crash message : "reason = "The model used to open the store is incompatible with the one used to create the store""
Upvotes: 0
Views: 1054
Reputation: 14845
Every time you change the database model you must reset the iOS simulator as it has an old version of the database.
Upvotes: 2
Reputation: 23
Sometimes deleting all files in Library/Developer/Xcode do the job ..
Upvotes: -1