Preserving data when an app updates

Hi all

I’m developing an app which stores a JSON formatted text file to keep track of progress through the app so that when it is launched again progress is maintained.

I am curious as to what happens when someone downloads the app from the store, does some stuff that updates the progress file and then downloads an update to my app (when we make amends etc).

I assume the data file would be deleted and replaced with a new one and that all data would be lost.  

Clearly this isn’t desirable, so I was wondering if any of you gurus out there know of a way to preserve this data when the app gets updated.

I am only releasing this in the Apple Store for iOS at the moment, although I’d be interested to hear about Android and KFHD solutions too as we may release to those down the line.

Thank you all in advance.

Dougi

The data file does NOT get deleted and replaced when you update an app (as long as it’s stored in the documents directory, and not the temporary or cache directory). This happens on all the App Stores. Would be a nightmare if it wasn’t like this!

Thank you very much.  Music to my ears.  I don’t have to change a thing then!  Love it when that happens.

Cheers

D

The data file does NOT get deleted and replaced when you update an app (as long as it’s stored in the documents directory, and not the temporary or cache directory). This happens on all the App Stores. Would be a nightmare if it wasn’t like this!

Thank you very much.  Music to my ears.  I don’t have to change a thing then!  Love it when that happens.

Cheers

D