iOS 8 introduced WKWebView, a modernised web view for iOS with more features, particularly notably JIT compilation for Javascript code which significantly improves performance.
However WKWebView on iOS 8 had some bugs which prevented Cordova using it by default. AFAIK there are plugins that can use it, but they all say "beta", "incomplete" etc. Also as far as I'm aware iOS 9 fixes the bugs that stopped Cordova defaulting to WKWebView in iOS 8.
So what is the state of WKWebView in Cordova on iOS 9? I can't seem to find any information about this. Does Cordova default to WKWebView on iOS 9? If not why not, and can it be officially enabled another way?
New edit: August 2018
Apple has deprecated
UIWebView
in iOS 12 and will probably remove it in iOS 13.Apache Cordova has announced that it will integrate the
cordova-plugin-wkwebview-engine
intocordova-ios
in next major release (5.x.x), butUIWebView
will still work and be the default one. Also, you'll be able to switch between them in runtime to easily test your app. In a future release it will remove the wholeUIWebView
code and theWKWebView
will be the only option.But
cordova-plugin-wkwebview-engine
still have a lot of issues. I still recommend using cordova-plugin-ionic-webview as usingGCDWebServer
solves most of theWKWebView
issues.New edit: November 2017
Ionic team has launched a new WKWebView plugin that is no longer a fork of the Cordova one and uses
GCDWebServer
internally and overcomes most of the Cordova plugin known issues.New edit: 24 August 2016
Updated just to add a fork of the apache's
WKWebView
plugin created by the ionic framework team that adds some enhancements to the plugin.https://github.com/driftyco/cordova-plugin-wkwebview-engine
The enhancements will probably land on the core plugin soon, but you can take a look and test the ionic fork now.
New edit: 9 December 2015
cordova ios 4.0.0 has been released and the version 1.0.0 of
cordova-plugin-wkwebview-engine
To try it:
As I already told, cordova-plugin-wkwebview-engine only supports iOS 9, on iOS 8 it will use UIWebView and has some know issues
If you want to support iOS 8 too, you can use the wkwebview-engine-localhost (experimental) or cordova-plugin-wkwebview from Telerik, both of them use a local web server
https://github.com/apache/cordova-plugins/tree/master/wkwebview-engine-localhost
OLD MESSAGE:
You can use WKWebView with cordova using the WKWebView plugins available.
The problem you mention is that WKWebView can't load local files, so the plugins use a local web server to workaround the problem.
There are some of them like this one from telerik https://github.com/Telerik-Verified-Plugins/WKWebView (with the web server built in) or the official from cordova team https://github.com/apache/cordova-plugins/tree/master/wkwebview-engine-localhost (with the web server as dependency plugin)
As the bug you mention is fixed on iOS 9, the current cordova plugin (compatible with iOS 8 and iOS 9, using the web server) has been renamed to wkwebview-engine-localhost, and the current name cordova-plugin-wkwebview-engine will be used for a new plugin that will support iOS 9 only and won't use the web server
You can see the issues to track the progress here
https://issues.apache.org/jira/browse/CB-9566
https://issues.apache.org/jira/browse/CB-9567
EDIT: I bring news https://shazronatadobe.wordpress.com/2015/09/09/apache-cordova-ios-4-0-0-and-wkwebview-support/