
Security News
TypeScript is Porting Its Compiler to Go for 10x Faster Builds
TypeScript is porting its compiler to Go, delivering 10x faster builds, lower memory usage, and improved editor performance for a smoother developer experience.
cocoon-cordova-plugin-wkwebview-engine
Advanced tools
The official Apache Cordova WKWebView Engine Plugin (Cocoon Mod)
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:
xcode-select --print-path
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" />
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.
Starting with cordova-cli 5.4.0, it will support automatic conversion of the <access> tags in config.xml to Application Transport Security ATS directives.
Upgrade to at least version 5.4.0 of the cordova-cli to use this new functionality.
If you are upgrading from UIWebView, please note the limitations of using WKWebView as outlined in our issue tracker.
The AllowInlineMediaPlayback
preference will not work because of this Apple bug. This bug has been fixed in iOS 10.
FAQs
The official Apache Cordova WKWebView Engine Plugin (Cocoon Mod)
The npm package cocoon-cordova-plugin-wkwebview-engine receives a total of 4 weekly downloads. As such, cocoon-cordova-plugin-wkwebview-engine popularity was classified as not popular.
We found that cocoon-cordova-plugin-wkwebview-engine demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
TypeScript is porting its compiler to Go, delivering 10x faster builds, lower memory usage, and improved editor performance for a smoother developer experience.
Research
Security News
The Socket Research Team has discovered six new malicious npm packages linked to North Korea’s Lazarus Group, designed to steal credentials and deploy backdoors.
Security News
Socket CEO Feross Aboukhadijeh discusses the open web, open source security, and how Socket tackles software supply chain attacks on The Pair Program podcast.