Magrider
Magrider

Reputation: 51

When should I increase xcdatamodeld version?

someone please explain when should I increase the xcdatamodeld version? I google a lot, there are all about migration, but when should I increase the version?

Currently if I make change in my xcdatamodeld such as add entity or add attribute, I will recreate nsmanagedobject subclass. But I am not sure what situation that I have to increase the xcdatamodeld version.Please someone explain it. Thanks!

Upvotes: 1

Views: 203

Answers (1)

ghostatron
ghostatron

Reputation: 2650

I think of it as a tool for helping users of my app migrate from the previous data model to the new data model. So I don't bump the version up unless I have to "release" it in some fashion (app store, or internal testers). Even then, if I have a small group of testers, I may just tell them to delete and reinstall so that I don't have to muck with it.

If a user with the old data model installs your app update with a new data model, they will crash unless you instruct the data model to "migrate".

Upvotes: 1

Related Questions