This is a
playground to test code. It runs a full
Node.js environment and already has all of
npm’s 400,000 packages pre-installed, including
cordova-plugin-rawzor-wkwebview-engine with all
npm packages installed. Try it out:
cordova-plugin-rawzor-wkwebview-engine lists no main file and has no index.js, so it can't be directly required. If this is a mistake, please let us know. It may however contain internal files that you can require manually:
This service is provided by RunKit and is not affiliated with npm, Inc or the package authors.
This plugin makes
Cordova use the
WKWebView component instead of the default
UIWebView component, and is installable only on a system with the iOS 9.0 SDK.
In iOS 9, Apple has fixed the issue present through iOS 8 where you cannot load locale files using file://, and must resort to using a local webserver. However, you are still not able to use XHR from the file:// protocol without CORS enabled on your server.
This plugin needs cordova-ios >4.0.0.
To install the current release:
cordova create wkwvtest my.project.id wkwvtest cd wkwvtest cordova platform add ios@4 cordova plugin add cordova-plugin-wkwebview-engine
To test the development version:
cordova create wkwvtest my.project.id wkwvtest cd wkwvtest cordova platform add https://github.com/apache/cordova-ios.git#master cordova plugin add https://github.com/apache/cordova-plugin-wkwebview-engine.git#master
You also must have at least Xcode 7 (iOS 9 SDK) installed. Check your Xcode version by running:
WKWebView may not fully launch (the deviceready event may not fire) unless if the following is included in config.xml. This should already be installed by Cordova in your platform config.xml when the plugin is installed.
<feature name="CDVWKWebViewEngine"> <param name="ios-package" value="CDVWKWebViewEngine" /> </feature> <preference name="CordovaWebViewEngine" value="CDVWKWebViewEngine" />
This plugin creates a shared
WKProcessPool which ensures the cookie sharing happens correctly across
CDVWKProcessPoolFactory class can be used to obtain the shared
WKProcessPool instance if app creates
WKWebView outside of this plugin.
On an iOS 8 system, Apache Cordova during runtime will switch to using the UIWebView engine instead of using this plugin. If you want to use WKWebView on both iOS 8 and iOS 9 platforms, you will have to resort to using a local webserver.
We have an experimental plugin that does this. You would use that plugin instead of this one.
Upgrade to at least version 5.4.0 of the cordova-cli to use this new functionality.
In order to allow swiping backwards and forwards in browser history like Safari does, you can set the following preference in your
<preference name="AllowBackForwardNavigationGestures" value="true" />
In order to disable preview popups when hard pressing links in iOS, you can set the following preference in your
<preference name="Allow3DTouchLinkPreview" value="false" />
If you are upgrading from UIWebView, please note the limitations of using WKWebView as outlined in our issue tracker.