You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cordova.apache.org by GitBox <gi...@apache.org> on 2020/08/31 14:48:48 UTC

[GitHub] [cordova-ios] breautek commented on issue #979: [Question] cordova-ios 6.1 wkwebview localstorage migrate

breautek commented on issue #979:
URL: https://github.com/apache/cordova-ios/issues/979#issuecomment-683826949


   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.
   
   1. Inside `plugin.xml`, the `<dependency id="cordova-plugin-wkwebview-engine" version="^1.1.0" />` line needs to be removed.
   2. If you want to use schemes (which I would personally recommend), then not only does the sqlite needs to be moved into a new folder, the filename needs to be named using the naming scheme above. The default scheme used is `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](https://github.com/totalpave/cordova-plugin-migrate-localstorage) 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](http://slack.cordova.io/) if you require further assistance.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org