Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

iPhone localstorage lifecycle - does it survive an app-update?

I'm currently developing an iPhone App that uses Phonegap and HTML5. I use localstorage to save in-game-achievements.

I was wondering what would happen the user pulls an update for that app from the AppStore. Is the localstorage data persistent? Or do I have to switch to SQLite, which is actually abandoned by the W3C..

Any experience would be appreciated.

like image 427
RedRoosterMobile Avatar asked Feb 02 '23 09:02

RedRoosterMobile


1 Answers

Yes your localStorage is going to stick around until the app is deleted.

Try it out by building a basic app that you set some localStorage items, then recompile and update the app with changes your localStorage will stay where it is.

SQLLite will work, but you can store quite a bit of information in localStorage and achieve nearly the same results.

I use localStorage in a number of projects and it works great!

Hope that answers your question

like image 158
Drew Dahlman Avatar answered Feb 05 '23 17:02

Drew Dahlman