I have an application on app-store which is DB driven, mean all the content is residing in the sqlite DB file. Now, I need to send another update of the app with some content update in the sqlite DB, so, What’s the simplest way to make it sure that my DB gets updated during app update. Note that it’s static app and there’s no online services included to sync DB so I am looking for something simple, without involvement of server side services etc. Awaiting response. Thanks for your consideration.
Share
If you make a copy of your database to somewhere like the Caches folder, you should add an extra table to the database with an entry for the database version. Add something like
2011-11-23as a string or date to a “db_version” entry. When you update the database, update that field. When your app starts, check the app bundle version of the database against the copied database. If the app bundle version is newer, copy it after deleting the old one.If the database file is used from the app bundle without being copied, you don’t need to do anything. The old version will be deleted when the app is updated.