In my app I am using sqlite database I don\'t want to replace an existing database when app is updated in app store.
Will it replace with new database? Or will it re
@Ankit: Hi..
Answer is NO it will not replace the database it will remain the same old database for the users who are aready using previous version of your app and then they just download and install the new version of the app without deleting the previous version.
It will replace database on App Store but it does not replace the database by default if the user is using previous version of your app. If database already exists then it does not replace the database procedure
We have to make a database upgrade procedure where in we have to check some flag or the version number in database if provided and based on that we have to create a database upgrade procedure.
You have to make the changes in database using database upgrade procedure and make alterations into existing tables such as adding or deleting a column or may be changing the structure of the table using SQL Queries.
Then you have to finally update the version number or some flag in the database which would let it know that the database is already upgraded so it should not run the same procedure every time when application loads.
Also it is important that you take care of the existing data that the user has stored in his/her database. It should not be deleted.
Feel free to contact me if you need more help.
Hope this helps.