- This is a fork of cordova-plugin-inappbrowser
- It uses the the newer WKWebview to power the InAppBrowser, in contrast to
cordova-plugin-inappbrowserwhich still currently uses the legacy UIWebView.
- Only the iOS platform has been changed from the original
- The plugin supports iOS 9 and above
- While WKWebView was introduced in iOS 8, it contained critical bugs making it effectively unusable for Cordova-based apps
Some advantages of using WKWebView over UIWebView include:
- Performance: graphic-intensive operations such as WebGL run much faster and more efficiently in WKWebView.
- Stability: WKWebView has many improvements which leads to up to 70% less crashes.
- Shared cookies: setting a cookie in an IAB window makes it available in the main Cordova Webview and vice-versa. This is especially useful for cookies that store authentication credentials since they will be preserved between IAB sessions.
cordova plugin add cordova-plugin-inappbrowser-wkwebview cordova plugin add cordova-plugin-wkwebview-engine
- This plugin depends on cordova-plugin-wkwebview-engine which adds WKWebView support to Cordova.
- You need to add this (or a variant) manually to your project
- This means the main Cordova app Webview will also use WKWebView on iOS 9+.
cordova-plugin-inappbrowser-wkwebview-test contains a Cordova project which builds an iOS test app to validate/illustrate usage of this plugin.
cordova-plugin-inappbrowser-popup-bridge is an extension of this plugin which adds support for Braintree's PopupBridge libraries for Android and iOS to support PayPal payments within the context of the InappBrowser element of a Cordova-based app.
Plugin usage and API
The plugin API is identical to cordova-plugin-inappbrowser.