Closed ikoshik closed 4 years ago
It is possible, but it isn't something supported by Cordova itself.
The local storage files are simply a sqlite database with the following naming scheme: <scheme>_<origin>_0.localstrage
In the case of the UIWebView
/ using the file://
protocol, where it has no origin
... the name would be file__0.localstorage
If you're migrating from UIWebView
to WKWebView
, that plugin should work, however some modifications needs to be applied.
plugin.xml
, the <dependency id="cordova-plugin-wkwebview-engine" version="^1.1.0" />
line needs to be removed.app://localhost
, which would make the local storage file name be app_localhost_0.localstorage
Below doesn't target you, but in case it helps someone else...
If you're migrating from WKWebView to a scheme, then you can probably look at this fork I have, which migrated WKWebView file protocol to ionic webview scheme.
Because we use github for issues, I'll close this issue. But don't hesitate to join our slack if you require further assistance.
Hello! After update cordova-ios 5 to 6 we use wkwebview now So the question is it possible to migrate localstorage from webview to wkwebview? Tried to use https://github.com/MaKleSoft/cordova-plugin-migrate-localstorage but does not work. There is need to use plugin wkwebview...