New WKWebView plugin for Cordova apps
I have some exciting news for Cordova app developers looking for the best possible performance on iOS devices:
The Oracle JET team released v2 of the cordova-plugin-wkwebview-file-xhr Cordova plugin today and now this is the only plugin you need to gain the performance benefits of the WKWebView on iOS, without the CORS limitations that stop many developers from using this web view in their apps.
To include this plugin in your Oracle JET mobile app, simply type:
ojet add plugin cordova-plugin-wkwebview-file-xhr
Or if you are using plain Cordova or another Cordova-based framework, such as Ionic:
cordova plugin add cordova-plugin-wkwebview-file-xhr
This plugin includes the Apache Cordova team’s cordova-plugin-wkwebview-engine plugin to use WKWebView in place of UIWebView within your app, and intercepts your app’s XHR GET requests that use the file:// protocol or that access remote endpoints, routing them through the native layer.
This approach is secure and avoids the overhead introduced by proxies or local web servers. Best of all, no more Failed to load resource: Origin null is not allowed by Access-Control-Allow-Origin errors.
Try it out and let us know how it goes for you by commenting in the Oracle JET Community.