apache / cordova-ios

Apache Cordova iOS
https://cordova.apache.org/
Apache License 2.0
2.16k stars 989 forks source link

Localstorage data cleared after app update from appstore #1117

Closed sargissaradyan closed 3 years ago

sargissaradyan commented 3 years ago

Bug Report

Problem

After moving to wkwebview each time after app update localstorage data cleared

What is expected to happen?

Persist localstorage data after app update

What does actually happen?

After updating app from AppStore localstorage data cleared

Information

Command or Code

window.localStorage.setItem

Environment, Platform, Device

All iOS devices

Version information

Cordova iOS 6.2.0 Cordova CLI 10.0.0 Xcode 12.4

Checklist

NiklasMerz commented 3 years ago

Unfortunately this is not an issue that can be solved by Cordova. The iOS WebView tends to clear it's storage under certain conditions. I suggest you to investigate this and look for alternatives.

From my experience native storage solutions (plugins) like SQLite are way more reliable.

sargissaradyan commented 3 years ago

Unfortunately this is not an issue that can be solved by Cordova. The iOS WebView tends to clear it's storage under certain conditions. I suggest you to investigate this and look for alternatives.

From my experience native storage solutions (plugins) like SQLite are way more reliable.

Ok. Thank You.