iPhone 本地存储生命周期 - 它能否在应用更新后继续存在? [英] iPhone localstorage lifecycle - does it survive an app-update?

查看:33
本文介绍了iPhone 本地存储生命周期 - 它能否在应用更新后继续存在?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我目前正在开发一个使用 Phonegap 和 HTML5 的 iPhone 应用程序.我使用 localstorage 来保存游戏内的成就.

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

我想知道用户从 AppStore 中提取该应用的更新会发生什么.localstorage 数据是否持久化?或者我必须改用 SQLite,它实际上被 W3C 抛弃了..

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..

任何经验将不胜感激.

推荐答案

是的,您的 localStorage 会一直存在,直到应用程序被删除.

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

通过构建一个设置一些 localStorage 项的基本应用程序来尝试一下,然后重新编译并更新应用程序,更改您的 localStorage 将保持原样.

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 可以工作,但您可以在 localStorage 中存储相当多的信息并获得几乎相同的结果.

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

我在许多项目中使用 localStorage 并且效果很好!

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

希望能回答您的问题

这篇关于iPhone 本地存储生命周期 - 它能否在应用更新后继续存在?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆