Chris Lin
Chris Lin

Reputation: 709

Core data after app store update

we published an app in app store, recently added new entities to core data for next version update. At this point we are not worried about migration because all the user's data are stored in our server.

My question is will the update overwrite previous version of core data? if not, how to wipe out the older version?

Upvotes: 2

Views: 1251

Answers (1)

Mundi
Mundi

Reputation: 80271

The short answer is: yes, the update will overwrite the previous version of Core Data.

More precisely, it will migrate to the new data model and therefore adjust the sqlite store, creating new tables and fields as necessary. This version of the sqlite store will be incompatible with old versions. The old version of the sqlite store will be gone.

This implies that when you do a server sync, the applied logic to insert the new information into Core Data also has to be updated to reflect the new model.

Upvotes: 2

Related Questions