1

I, like many others, am building an iOS and Android Hybrid App with HTML5/Javascript and a bridge (Phonegap/Intel XDK). I have yet to find a definitive answer on persistent storage, e.g. storing app settings for the lifetime of the app.

Posts like: is localStorage on iPad Safari guaranteed to be persistent? suggest there is no guarantee that settings stored will persist.

Can anyone put my mind at rest and give a decent answer as to whether it's possible? A lot of useful apps are potentially useless without the ability to store user entered data.

I have played with lawnchair.js http://brian.io/lawnchair/ and am heading down this route. Can anyone too suggest whether this solves the problem or suggest the best persistent storage option in their opinion?

Community
  • 1
  • 1
Gga
  • 4,311
  • 14
  • 39
  • 74

1 Answers1

1

Local storage is rather reliable method. This data removes only when user removes app from his device. You can also save data with WebSQL DB for Android devices. But it's rather uncomfortably. Or you can use File API to save settings in folder, like .yourapp, and read data from this file. But user can remove this folder. So I recommend localStorage.