Programmatically Reset Persistent Store file in Core Data
We know the message
The model used to open the store 开发者_如何学Pythonis incompatible with the one used to create the store
We also know the solution. Just delete the apps, reset.
Can we do that programatically?
The core data only store cache result anyway.
That way once the apps are online I do not have to worry about updating core data.
Just use NSFileManager
to delete the data store file on disk.
精彩评论