All Projects → apache → Cordova Plugin Wkwebview Engine

apache / Cordova Plugin Wkwebview Engine

Licence: apache-2.0
[DEPRECATED] Apache Cordova wkwebview engine plugin

Programming Languages

javascript
184084 projects - #8 most used programming language
java
68154 projects - #9 most used programming language
csharp
926 projects
cplusplus
227 projects

Projects that are alternatives of or similar to Cordova Plugin Wkwebview Engine

Cordova Plugin Device
Apache Cordova Plugin device
Stars: ✭ 327 (-46.13%)
Mutual labels:  library, mobile, cordova
Cordova Plugin Splashscreen
Apache Cordova Plugin splashscreen
Stars: ✭ 602 (-0.82%)
Mutual labels:  library, mobile, cordova
Cordova Osx
Apache Cordova mac
Stars: ✭ 232 (-61.78%)
Mutual labels:  library, mobile, cordova
Framework7
Full featured HTML framework for building iOS & Android apps
Stars: ✭ 16,560 (+2628.17%)
Mutual labels:  library, mobile, cordova
Cordova Plugin Whitelist
Apache Cordova plugin whitelist
Stars: ✭ 442 (-27.18%)
Mutual labels:  library, mobile, cordova
Cordova
Apache Cordova
Stars: ✭ 291 (-52.06%)
Mutual labels:  library, mobile, cordova
Cordova Plugin Media
Apache Cordova Plugin media
Stars: ✭ 338 (-44.32%)
Mutual labels:  library, mobile, cordova
Cordova Plugin Screen Orientation
Cordova Plugin Screen Orientation
Stars: ✭ 181 (-70.18%)
Mutual labels:  library, mobile, cordova
Cordova Plugin Network Information
Apache Cordova Plugin network-information
Stars: ✭ 429 (-29.32%)
Mutual labels:  library, mobile, cordova
Cordova Plugman
Apache Cordova Plugman
Stars: ✭ 379 (-37.56%)
Mutual labels:  library, mobile, cordova
Cordova Plugin Geolocation
Apache Cordova Plugin geolocation
Stars: ✭ 584 (-3.79%)
Mutual labels:  library, mobile, cordova
Cordova Weinre
Mirror of Apache Weinre
Stars: ✭ 506 (-16.64%)
Mutual labels:  library, mobile, cordova
Cordova Plugin Contacts
Apache Cordova Plugin contacts
Stars: ✭ 203 (-66.56%)
Mutual labels:  library, mobile, cordova
Cordova Plugin Statusbar
Apache Cordova
Stars: ✭ 581 (-4.28%)
Mutual labels:  library, mobile, cordova
Cordova Windows
Apache Cordova Windows
Stars: ✭ 188 (-69.03%)
Mutual labels:  library, mobile, cordova
Cordova Plugin Media Capture
Apache Cordova Plugin media-capture
Stars: ✭ 271 (-55.35%)
Mutual labels:  library, mobile, cordova
Cordova Browser
Apache Cordova
Stars: ✭ 142 (-76.61%)
Mutual labels:  library, mobile, cordova
Cordova Plugin Console
[DEPRECATED] Apache Cordova Plugin console
Stars: ✭ 145 (-76.11%)
Mutual labels:  library, mobile, cordova
Cordova Plugins
Apache Cordova
Stars: ✭ 242 (-60.13%)
Mutual labels:  library, mobile, cordova
Cordova Plugin Dialogs
Apache Cordova Plugin dialogs
Stars: ✭ 267 (-56.01%)
Mutual labels:  library, mobile, cordova
AppVeyor Travis CI
Build status Build Status

Cordova WKWebView Engine

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.

Deprecation Notice

This plugin is now deprecated as it's implementation has been moved to cordova-ios platform making this plugin redundent. When migrating to [email protected], you should remove this plugin.

This plugin should still work as is on [email protected] for the foreseeable future, however it is recommended to remove this plugin and upgrade to [email protected] or later.

Installation

This plugin needs cordova-ios 4.0.0 - 5.x. This plugin is not supported on cordova-ios >6.0.0.

To install the current release:

cordova create wkwvtest my.project.id wkwvtest
cd wkwvtest
cordova platform add [email protected]
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

Required Permissions

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.

config.xml

<feature name="CDVWKWebViewEngine">
  <param name="ios-package" value="CDVWKWebViewEngine" />
</feature>

<preference name="CordovaWebViewEngine" value="CDVWKWebViewEngine" />

If using cordova-ios >= 5.1.0, it is recommended to include the following preference tag to only use the WKWebView which is a requirement for new App submissions to the AppStore:

<preference name="WKWebViewOnly" value="true" />

Notes

This plugin creates a shared WKProcessPool which ensures the cookie sharing happens correctly across WKWebView instances. 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.

Application Transport Security (ATS) in iOS 9

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.

Enabling Navigation Gestures ("Swipe Navigation")

In order to allow swiping backwards and forwards in browser history like Safari does, you can set the following preference in your config.xml:

<preference name="AllowBackForwardNavigationGestures" value="true" />

You can also set this preference dynamically from JavaScript:

window.WkWebView.allowsBackForwardNavigationGestures(true)
window.WkWebView.allowsBackForwardNavigationGestures(false)

Disabling 3D Touch Link Previews

In order to disable preview popups when hard pressing links in iOS, you can set the following preference in your config.xml:

<preference name="Allow3DTouchLinkPreview" value="false" />

Limitations

If you are upgrading from UIWebView, please note the limitations of using WKWebView as outlined in our issue tracker.

Apple Issues

The AllowInlineMediaPlayback preference will not work because of this Apple bug. This bug has been fixed in iOS 10.

Supported Platforms

  • iOS
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].