Localstorage cleared after restarting the application on phonegap IOS?

前端 未结 1 421
野的像风
野的像风 2021-01-12 13:16

I am trying to cache JSON data on in localstorage to load it when there is no internet connection. It is working fine but when I restart the app I think the localstorage cle

相关标签:
1条回答
  • 2021-01-12 13:55

    Starting from IOS 5.1 Apple decided to make local storage a temp area. If you need persistent storage on iOS 5.1, use PhoneGap's File API. Here are a couple links to learn about the issue.

    http://community.phonegap.com/nitobi/topics/phonegapbuild_localstorage_on_ios_5_1

    http://docs.phonegap.com/en/2.6.0/cordova_storage_storage.md.html#Storage

    Apple discurages you from using local storage as well. iOS PhoneGap app rejected because of the use of localStorage

    0 讨论(0)
提交回复
热议问题