WKWebview v3.0.0


WKWebview v3.0.0 :tada:

Howdy folks!

We’ve been working on updating the wkwebview plugin to address many of the issues it has had.
The latest version, 3.0, includes a bunch of fixes regarding CORs issues, background issues, and much more.

Give it a try and let us know how it works for you!


If you already have the wkwebview plugin installed, you’ll want to remove it first.

ionic plugin rm cordova-plugin-wkwebview-engine --save

Then install the latest from master

ionic plugin install https://github.com/driftyco/cordova-plugin-wkwebview-engine --save

We’re still looking for feed back on things like remote/local audio/video, integration with custom URL schemes, and different href schemes.

If you come across any problems, please feel free to open on issue on the plugin repo.

If you want to know more about the WKWebView plugin and its benefits, please read our previous blog: http://blog.ionic.io/cordova-ios-performance-improvements-drop-in-speed-with-wkwebview/

WKWebView to become the default webview for Ionic on iOS


@mhartington, Does not install. No errors. config.xml is not updated. Any advices?

$ ionic plugin install https://github.com/driftyco/cordova-plugin-wkwebview-engine --save
cordova-plugin-app-update 1.3.9 "AppUpdate"
cordova-plugin-appversion 1.0.0 "App Version"
cordova-plugin-console 1.0.6 "Console"
cordova-plugin-device 1.1.5 "Device"
cordova-plugin-facebook4 1.7.4 "Facebook Connect"
cordova-plugin-firebase 0.1.19 "Google Firebase Plugin"
cordova-plugin-google-analytics 1.7.5 "Google Universal Analytics Plugin"
cordova-plugin-googleplus 5.1.1 "Google SignIn"
cordova-plugin-inapppurchase 1.1.0 "In App Purchase"
cordova-plugin-splashscreen 4.0.2 "Splashscreen"
cordova-plugin-statusbar 2.2.2 "StatusBar"
cordova-plugin-whitelist 1.3.2 "Whitelist"
ionic-plugin-deeplinks 1.0.14 "Ionic Deeplink Plugin"
ionic-plugin-deploy 0.6.5 "IonicDeploy"
ionic-plugin-keyboard 2.2.1 "Keyboard"


Installed after removing/adding iOS platform.


In another release there was a change in what you have to put in your config.xml. Did you update the value of <allow-navigation>?

<allow-navigation href="http://localhost:8080/*" />

Edit: It’s working on all my iOS devices now.

The only little thing I’d like to have would be not having to set up those Safari specific CORS headers in our web servers. But anyway, that’s currently the only little drawback we have to deal with. On the other hand it solves many issues, especially layout things and it’s much faster, that’s amazing and totally worth it :slight_smile:.


Does this version support local xhr?


yes! it does support local XHR


Installed the plugin. The quick feedback is great work!!! it seems like many issues were solved over what we had in version WKWebview v2.
One feedback: when running the project from Xcode on iPhone the Safari developer tools keeps showing up in some strange way even though I didn’t even inspected the app with Safari.


Showing keyboard upon input focus still not working. Any way to workaround it?


Maybe you’ve checked Develop => Device-Name => Automatically Show Web Inspector for JSContexts in Safari previously?

I did that in the past but the old UIWebView never triggered anything ;).


True. Unchecking it solves the issue. Thanks.


Scroll doesn’t work as good as it does with the old view. There are more accidental clicks that leads to navigating to next page when trying to scroll up and down. Sometimes the scroll is freezing for a sec or two.

I’m using Ionic 1.3.2 BTW.


@yosikal could you put together a simple minimal project to look at? There’s probably some logic that is getting messed up in V1 when it tries to figure out how to handle clicks/taps correctly.


Added the plugin to my project, working great so far! :slight_smile:

Edit: Crashing after a few mins now :frowning:


What version of ionic are you using?


Cordova CLI: 5.3.3
Ionic Framework Version: 2.0.1
Ionic CLI Version: 2.2.0
Ionic App Lib Version: 2.2.0
Ionic App Scripts Version: 1.0.0
ios-deploy version: 1.9.0
ios-sim version: 5.0.8
OS: macOS Sierra
Node Version: v6.2.0
Xcode version: Xcode 8.2.1 Build version 8C1002


Could you run ionic platform ls? The CLI version looks a little old so you might have an older version of cordova-ios


Gave it a try today… we would love to see this plugin work.

2 issues so far on our side

  • cordova-plugin-image-picker 1.1.1 fails to output images with file://
  • for authentication we use Auth0 with a custom interface and WKWebview breaks the authentication in the inappbrowser (not sure why)

System info:
Cordova CLI: 6.5.0
Ionic Framework Version: 1.3.1
Ionic CLI Version: 2.0.0
Ionic App Lib Version: 2.0.0-beta.20
ios-deploy version: 1.9.1
ios-sim version: 5.0.8
OS: Mac OS X El Capitan
Node Version: v4.4.7
Xcode version: Xcode 8.2 Build version 8C38


So file:// not working has always been a case for wkwebview and there’s not really much we can do about that.
What you can do though is to remove the file:// prefix and that should work.

As for the Auth0 issue, we’ll have to look into this more. Could you open an issue on github in the meantime?

WKWebview and "file://" - doesn't work even after removing file://

thanks… I will run the plugin again tomorrow and gather some more debug info before posting it on github