Skip to main content
Giles Corey
Participating Frequently
February 10, 2015
Question

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

  • February 10, 2015
  • 2 replies
  • 325 views

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
February 10, 2015

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.

Inspiring
February 10, 2015

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