XCode keeps reverting my Core Data Model to an older version
I have an xcode project with a core data model. I have added a new model
version to the project and marked it as the current version in xcode.
This works fine and my app will perform the lightweight migration and open
up the database.
The problem is when I close down Xcode and then open up the project again,
the model reverts to the older version. This is not shown in xCode as the
green arrow is still against Model.1.0.6 but I can clearly see this if I
look at the .xcdatamodeld file.
When I start the app after reopening I get exceptions due to missing
entities. If I use the project navigator to select the current model
version as 'Model.xcdatamodel' and then toggle it back to
'Model.1.0.6.xcdatamodel' and then start the app again it works fine
again.
I have to do this every time I reopen the project. It looks like XCode is
reverting to the old model version every time I open the project for some
reason but I can't figure out why.
No comments:
Post a Comment