views:

279

answers:

2

Hi,

I have a query regarding What happens to previous data when app is upgraded to new version .

I have a current application having a local database. The user can modify the database.

Now If I upgrade the application to next version with some new functionality what will happen? Will it completely replace the database or I can still use it. And if the database is still there then how can new functionality use it as earlier i.e. Assuming that it is still in the resources?

Please help in this regard. Thanks in advance.

EDIT:

I tried and found that We can use the earlier database.

One more question.

How to notify the user that an upgrade is available for the app? Do I need to use push notification or is there any other method?

+2  A: 

The data in ~/Documents and ~/Library/Preferences will be kept. Those in ~/Library – I'm not sure, but I think they will be kept too. Those in your .app folder will be completely replaced, but the user can't change what's in your .app folder anyway.

KennyTM
+1  A: 

App data is managed by Bundle identifier, as app update is also on same Bundle identifier,

When user updates app, it automatically connected with same Bundle identifier, so data will be same as old version

But if u delete(uninstall) app then it will remove all relevant data from iPhone, then installing new upgraded app will not get old data

Mitul Nakum