I have an application in XCode using the sqlite/coredata database and that has already been submitted to the app store.
Now I have changed the database so my managed object is changed now and I want to submit the updated new version of my app. I also want that the people who have already downloaded the previous version of app won’t loose any data in the old database.How this can be achieved? Any help would be appreciated.
This documentation is the official word on the subject.
Though, a simple walkthrough would be something like:
Add a new model version:
Modify the new model version to your tastes, then make sure it’s set as the current model in the inspector of the root file.
Make a mapping model so that it knows how to migrate the data to the new model:
Choose the corresponding models (source/destination) and edit the generated mapping model to your tastes (often it requires no changes at all if your changes aren’t complex).
That’s a simplified/stripped down walkthrough but it’s a start. Read up on it!