Skip to main content
z-xhx
Participating Frequently
Feb 10, 2015 5:05 AM UTC
Question

What is the best way to do permanent local storage of small bits of data on mobile?

My app has a consumable item for purchase. Once purchased, it is consumed immediately, and the item's location is then permanently stored in the app.

What is the best way to achieve this? Should I use something like SharedObject, or do the contents of those get cleared when the app version updates?

Thanks for any help or ideas.

This topic is closed to new replies. Start a new post to keep the conversation going.

2 replies

Colin Holgate
Inspiring
Feb 10, 2015 3:20 PM UTC

Local testing will most likely clear the sharedobject, but App Store updates shouldn't.

In any case, you need to provide a Restore Purchases option, so that if the user deletes the app and then installs it again, they have a way to retrieve the purchase.

Translate
Inspiring
Feb 10, 2015 8:52 AM UTC

In my app I use a SharedObject to store some informations and when I deploy a new version on my Ipad to test it the SharedObject is cleared

I my case I have a large amount of data (let's say between 400MB and 2GB of media files) that the user can download in the app and I store it in a folder in File.documentsDirectory but each time I deploy my app on iOS the folder is deleted and I have to download everything again. I suppose that it will be the same when I publish app updates on the AppStore. What should I do to keep the file between updates ?

It's not a problem if the files are cleared when the system needs space, but if it's cleared when the app is updated it's quite annoying

Thanks in advance

Translate