cordova-plugin-ionic-webview
Advanced tools
Comparing version 2.1.4 to 2.2.0
@@ -6,2 +6,3 @@ # Changelog | ||
* Fix issue where two apps running on the same port could conflict with each other ([#169](https://github.com/ionic-team/cordova-plugin-ionic-webview/issues/165) & [#186](https://github.com/ionic-team/cordova-plugin-ionic-webview/pull/186)) | ||
* Add kitkat support (API 19) ([#144](https://github.com/ionic-team/cordova-plugin-ionic-webview/pull/144)) [@leo6104](https://github.com/leo6104) | ||
@@ -8,0 +9,0 @@ * Fix issue where local server was being used if launch URL is external ([#169](https://github.com/ionic-team/cordova-plugin-ionic-webview/pull/169)) |
{ | ||
"name": "cordova-plugin-ionic-webview", | ||
"version": "2.1.4", | ||
"version": "2.2.0", | ||
"description": "The official Ionic's WKWebView Engine Plugin", | ||
@@ -9,3 +9,3 @@ "main": "index.js", | ||
"version": "npm run sync_plugin_xml && git add plugin.xml", | ||
"deploy": "np --yolo" | ||
"deploy": "np" | ||
}, | ||
@@ -12,0 +12,0 @@ "repository": { |
@@ -22,8 +22,11 @@ <!-- | ||
# Ionic Web View | ||
# Ionic Web View for Cordova | ||
The Web View plugin for Cordova that is specialized for Ionic apps. | ||
A Web View plugin for Cordova, focused on providing the highest performance experience for Ionic apps (but can be used with any Cordova app). | ||
This is for `cordova-plugin-ionic-webview` @ `2.x`, which uses the latest and greatest features and may not work with all apps. See [Requirements](#requirements) and [Migrating to 2.x](#migrating-to-2x). | ||
This plugin defaults to using WKWebView on iOS and the latest evergreen webview on Android. Additionally, this plugin makes it easy to use HTML5 style routing | ||
that web developers expect for building single-page apps. | ||
Note: This repo and its documentation are for `cordova-plugin-ionic-webview` @ `2.x`, which uses the new features that may not work with all apps. See [Requirements](#requirements) and [Migrating to 2.x](#migrating-to-2x). | ||
:book: **Documentation**: [https://beta.ionicframework.com/docs/building/webview][ionic-webview-docs] | ||
@@ -35,8 +38,54 @@ | ||
### Requirements | ||
## Configuration | ||
This plugin has several configuration options that can be set in `config.xml`. Important: some configuration options should be adjusted for production apps, especially `WKPort`: | ||
### iOS and Android Preferences | ||
Preferences available for both iOS and Android platforms | ||
#### WKPort | ||
```xml | ||
<preference name="WKPort" value="8080" /> | ||
``` | ||
The default port the server will listen on. _You should change this to a random port number!_ | ||
### iOS Preferences | ||
Preferences only available for iOS platform | ||
#### WKSuspendInBackground | ||
```xml | ||
<preference name="WKSuspendInBackground" value="false" /> | ||
``` | ||
Whether to try to keep the server running when the app is backgrounded. Note: the server will likely be suspended by the OS after a few minutes. In particular, long-lived background tasks are not allowed on iOS outside of select audio and geolocation tasks. | ||
#### WKBind | ||
```xml | ||
<preference name="WKBind" value="localhost" /> | ||
``` | ||
The hostname the server will bind to. There aren't a lot of other valid options, but some prefer binding to "127.0.0.1" | ||
#### WKInternalConnectionsOnly (New in 2.2.0) | ||
```xml | ||
<preference name="WKInternalConnectionsOnly" value="true" /> | ||
``` | ||
Whether to restrict access to this server to the app itself. Previous versions of this plugin did not restrict access to the app itself. In 2.2.0 and above, | ||
the plugin now restricts access to only the app itself. | ||
## Plugin Requirements | ||
* **iOS**: iOS 10+ and `cordova-ios` 4+ | ||
* **Android**: Android 5.0+ and `cordova-android` 6.4+ | ||
* **Android**: Android 4.4+ and `cordova-android` 6.4+ | ||
### Migrating to 2.x | ||
## Migrating to 2.x | ||
@@ -43,0 +92,0 @@ 1. Remove and re-add the Web View plugin: |
@@ -127,3 +127,5 @@ /* | ||
var args = convertMessageToArgsNativeToJs(message); | ||
cordova.callbackFromNative(callbackId, success, status, args, keepCallback); // eslint-disable-line | ||
Promise.resolve().then(function () { | ||
cordova.callbackFromNative(callbackId, success, status, args, keepCallback); // eslint-disable-line | ||
}); | ||
}; | ||
@@ -130,0 +132,0 @@ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
379822
221
113