0

I have an iOS application using Angular.js and compiled to iOS using Phonegap. Yet, I have some trouble using localStorage. It works well, but after a given amount of time (approximatively half a day), all stored data are cleared.

Is there any retention delay parameter to configure, either on XCode or on Phonegap? I read that local storage is cleared when memory is too low. Yet, I don't have the mentionned pop-up.

Thanks for your help! :)

Jonathan Petitcolas
  • 4,254
  • 4
  • 31
  • 42

2 Answers2

1

No, sorry, localstorage is handled by the OS, and you can't trust that this data isn't going to be erased. If you want persistent data, you should go for SQLite or something like this.

Víctor
  • 3,029
  • 3
  • 28
  • 43
0

Never rely on localStorage as its not guaranteed to be retained forever. To answer your question, there is no such retention delay parameter configuration as the cleanup is handled by iOS at its will. Have a look at this link which provides more info on the same. Hope it helps.

Community
  • 1
  • 1
Gandhi
  • 11,875
  • 4
  • 39
  • 63