BarryK88
BarryK88

Reputation: 1806

How to update my Database.sqlite when submitting a new App

Within my App I'm using a coredata database. I manualy filled in new entries in the Database file, but when updating my App from the Appstore the old database is still being used. When I uninstall and install the App again on my device the new one is being used.

How can I make sure that when submitting a new App the new database is being used?

Upvotes: 1

Views: 113

Answers (1)

Make sure you are using a local copy of the builtin database. Then add something like, say, a version number to the database.

Add an entity:

Version
- version: double

Check the version for each databases and if the versions doesn't match, replace the local copy with a copy of the builtin database.

Upvotes: 1

Related Questions