Will data saved in $localstorage persist across an appstore/playstore update

I’ve found so many different opinions on this topic. Lots of threads (also in the ionic forums) stating that the data will be lost, others saying the data will persist.

This guy from SO claims that the data will persist and that he has submitted multiple updates to the Appstore without data loss (he also posts a link to his app).

I would switch to SQLite/Pouch but the app is done, and ready for release. Also the data is kind of crucial for the user, a data loss would be pretty bad :frowning:

Any tips, especially if you have experience on this, are greatly appreciated !! :smiley:
Best Regards

Hi, yes it can persist. For instance, Quizionic App Template illustrates that when switching form Free to Full version. So, when someone but a full version, the information is stored in localstorage.

have a look at this App Template 100% working with lot of features: http://codecanyon.net/item/quizionic-a-quiz-app-template-for-ionic-framework-with-sqlite-database/14205904

1 Like

Hey thanks for your answer. You are completely right it can persist! :slight_smile:

We did lots of testing though in the last couple of days and decided to switch to SQLite. On Android localstorage seems to be completely fine (all data always persists). On iOS though we ran into problems… It seems that localstorage is just deleted whenever iOS runs low on memory. We were able to recreate that multiple times (it seems to delete older stuff first, then newer stuff).

I would definitely recommend to stay away from localstorage except for data that is not that important and can be retrieved back somehow, at least on iOS


In my case, I used localstorage to store non-critical information, such as user name when it comes to App. if for any reason, that key,pair entry is not present, it asks again for user-name.

Same situation for determine free/full version. User always has the option to do a restore-purchase if for any reason that key-pair info is lost.

Finally, all the rest of the App data is stored in local SQLite. I wouldn’t go with cloud-based solution as they might disappear one day (the case of Parse, recently announced the end of service) or the updated rate for such cloud service.

For my Quizionic App Template, SQLite also provides me flexibility to also run the App under browser, by handling WebSQL under Chrome, which is pretty nice when developing and testing your app without installing it on device, because you can even use Developer Tools from Chrome to also perform queries or update data just from there, without the need of any other tool.