views:

152

answers:

1

Hi,

I developed one database related application for iPhone device(SQlite database). Now i want to update that application with more features(I want to push an update for the same application).

Here i am more concerned about the user data while pushing the update so my question is if i will push an update then does the update will clear all the data that is stored in .sqlite file?

if this is case then how to push application update without modifying the previous data in the database file?

Please suggest.

Thanks,
Jim.

+3  A: 

AFAIK the documents directory is left in-tact on an update. If you stored the database in the documents directory then you should be okay. If it's in the app's bundle, I don't think there is much you can do save it.

christo16
Thanks for reply. So you mean to say initially when application runs first time then copy the database file from resource to Documents directory. after that load the database file from document directory and perform the operation on that file. Am i correct??
Jim
Well, like I said it depends on where your app saves the database. If it's in the documents folder, then that if left in-tact during an update. If you stored it in the app's bundle, that is completely removed during an update (because your old binary is replaced by a new one). Not sure of a workaround for if you've stored it in the bundle :/
christo16
Thanks christo, I tried to store database in Documents directory and it worked as you said. Once again thanks for your help and quick responses.
Jim
Other thing that i want to clarify is does "Library" folder changes or remain as it is while updating application?
Jim