本文介绍了iOS 5.1在多任务栏中关闭PhoneGap应用程序时是否清除localStorage?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个应用程序保存读者的书签位置放入localStorage。当我在iOS 5.1关闭应用程序的书签已经走了,但在5.0.1它仍然在那里?

I have an app that saves a bookmark of the readers position an put in into localStorage. When I close the App on iOS 5.1 the bookmark is gone, but on 5.0.1 it´s still there?

推荐答案

,在iOS5.1中,localstorage被认为是临时数据,可以随时删除...
但是Kerri Shotts写了一个代码来支持localStorage的NATIVE持久化与phoneGap:

Unfortunately, in iOS5.1, localstorage is considered temporary data that can be deleted at any time...But Kerri Shotts wrote a code to support NATIVE persistence of localStorage with phoneGap : http://pastebin.com/5881768B

(它会将localstorage文件复制到安全文件夹并在必要时恢复)

(it will copy the localstorage file to a secure folder and restore it if necessary)

phonegap团队正在努力:

And phonegap team is working on that :https://issues.apache.org/jira/browse/CB-330

这篇关于iOS 5.1在多任务栏中关闭PhoneGap应用程序时是否清除localStorage?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-12 16:58