Reputation: 9875
Here I've got a question concerning releasing update of the application in app store.
I suppose all the information of the application, is removed and the update is installed like a new app. Please confirm.
Thanks
Upvotes: 3
Views: 461
Reputation: 26683
All the files stored inside your app's documents directory (which is usually where db file is stored) are preserved during app update.
Upvotes: 2
Reputation: 69469
No the users data will not be lost.
When you update an app only the bundle data will be updated, meaning the .app
directory of the installed app. Any other directory, like Documents
and Library
will not be touched.
If there is any data in for example the Documents
directory that need updating then you have to write code to detect that and make the necessary changes.
If the database is used by Core Data then you will need to version and migrate the data.
Upvotes: 4
Reputation: 4746
my guess is that it would not be replacing any of the existing files instead just updating them if any changes....the best example of data is not lost is that.....i usually update most of my games. and they do preserve my highscore even after the updates.. lol! So, go on. Nothing will be lost. Nice question though. :)
Upvotes: 0
Reputation: 3401
If you would have set the version number to your database for your iphone could have been easily handle, save your version number into your db and whenever database is called, compare the version against the expected version If new version > older version change the schema (this is needed if you would have changed the schema of your database) with using SQL ALTER statements and update the app version number. so whenever user is going to update or fresh installation, it will check the new version with your older version, if it differ then update schema, and if its same no need to make any changes.
If you would not have made any schema related changes (for example adding new column..) then you do not need to worry, user will not lose the data.
Upvotes: 1