diff --git a/.all-contributorsrc b/.all-contributorsrc
index 85bb8f79..3ed1cc7f 100644
--- a/.all-contributorsrc
+++ b/.all-contributorsrc
@@ -594,6 +594,15 @@
"contributions": [
"code"
]
+ },
+ {
+ "login": "LugonjaAleksandar",
+ "name": "Aleksandar Lugonja",
+ "avatar_url": "https://avatars.githubusercontent.com/u/41632269?v=4",
+ "profile": "https://www.bebilica.rs/",
+ "contributions": [
+ "code"
+ ]
}
],
"contributorsPerLine": 7,
diff --git a/CHANGELOG.md b/CHANGELOG.md
index a9482230..857d4841 100755
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -13,6 +13,8 @@
## 6.0.0-beta.8
+- Merged "Exposed "shared" property of HttpServer bind method to support more use-cases." [#1395](https://github.com/pichillilorenzo/flutter_inappwebview/pull/1395) (thanks to [LugonjaAleksandar](https://github.com/LugonjaAleksandar))
+- Fixed "ios 14.5 crash reports upgradeKnownHostsToHTTPS" [#1393](https://github.com/pichillilorenzo/flutter_inappwebview/issues/1393)
## 6.0.0-beta.7
@@ -87,6 +89,10 @@
- Removed `URLProtectionSpace.iosIsProxy` property
- `historyUrl` and `baseUrl` of `InAppWebViewInitialData` can be `null`
+## 5.7.1
+
+- Exposed "shared" property of HttpServer bind method to support more use-cases. (thanks to [LugonjaAleksandar](https://github.com/LugonjaAleksandar))
+
## 5.7.0
- Added `PlatformViewsService.initExpensiveAndroidView` for Android
diff --git a/README.md b/README.md
index 483972a2..a0017f89 100755
--- a/README.md
+++ b/README.md
@@ -5,7 +5,7 @@
![InAppWebView-logo](https://user-images.githubusercontent.com/5956938/195422744-bdcfed16-73f0-4bc9-94ab-ecf10771a1c4.png)
-[![All Contributors](https://img.shields.io/badge/all_contributors-65-orange.svg?style=flat-square)](#contributors-)
+[![All Contributors](https://img.shields.io/badge/all_contributors-66-orange.svg?style=flat-square)](#contributors-)
[![Pub](https://img.shields.io/pub/v/flutter_inappwebview?include_prereleases)](https://pub.dartlang.org/packages/flutter_inappwebview)
@@ -165,6 +165,7 @@ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/d
perffecto 💻 |
Chandra Abdul Fattah 💻 |
+ Aleksandar Lugonja 💻 |
diff --git a/ios/Classes/InAppWebView/InAppWebView.swift b/ios/Classes/InAppWebView/InAppWebView.swift
index 427aa1ca..f1bccad3 100755
--- a/ios/Classes/InAppWebView/InAppWebView.swift
+++ b/ios/Classes/InAppWebView/InAppWebView.swift
@@ -594,7 +594,7 @@ public class InAppWebView: WKWebView, UIScrollViewDelegate, WKUIDelegate,
configuration.limitsNavigationsToAppBoundDomains = settings.limitsNavigationsToAppBoundDomains
}
- if #available(iOS 14.5, *) {
+ if #available(iOS 15.0, *) {
configuration.upgradeKnownHostsToHTTPS = settings.upgradeKnownHostsToHTTPS
}
}
diff --git a/lib/src/in_app_localhost_server.dart b/lib/src/in_app_localhost_server.dart
index 452ddbb1..4c1b8613 100755
--- a/lib/src/in_app_localhost_server.dart
+++ b/lib/src/in_app_localhost_server.dart
@@ -17,6 +17,7 @@ class InAppLocalhostServer {
bool _started = false;
HttpServer? _server;
int _port = 8080;
+ bool _shared = false;
String _directoryIndex = 'index.html';
String _documentRoot = './';
@@ -25,15 +26,24 @@ class InAppLocalhostServer {
///- [directoryIndex] represents the index file to use. The default value is `index.html`.
///
///- [documentRoot] represents the document root path to serve. The default value is `./`.
+ ///
+ ///- The optional argument [shared] specifies whether additional `HttpServer`
+ /// objects can bind to the same combination of `address`, `port` and `v6Only`.
+ /// If `shared` is `true` and more `HttpServer`s from this isolate or other
+ /// isolates are bound to the port, then the incoming connections will be
+ /// distributed among all the bound `HttpServer`s. Connections can be
+ /// distributed over multiple isolates this way.
InAppLocalhostServer({
int port = 8080,
String directoryIndex = 'index.html',
String documentRoot = './',
+ bool shared = false,
}) {
this._port = port;
this._directoryIndex = directoryIndex;
this._documentRoot =
(documentRoot.endsWith('/')) ? documentRoot : '$documentRoot/';
+ this._shared = shared;
}
///Starts the server on `http://localhost:[port]/`.
@@ -57,7 +67,7 @@ class InAppLocalhostServer {
var completer = Completer();
runZonedGuarded(() {
- HttpServer.bind('127.0.0.1', _port).then((server) {
+ HttpServer.bind('127.0.0.1', _port, shared: _shared).then((server) {
print('Server running on http://localhost:' + _port.toString());
this._server = server;
diff --git a/lib/src/in_app_webview/in_app_webview_settings.dart b/lib/src/in_app_webview/in_app_webview_settings.dart
index 8b109bc1..dd00d45a 100755
--- a/lib/src/in_app_webview/in_app_webview_settings.dart
+++ b/lib/src/in_app_webview/in_app_webview_settings.dart
@@ -1183,7 +1183,7 @@ class InAppWebViewSettings_ {
///A Boolean value indicating whether HTTP requests to servers known to support HTTPS should be automatically upgraded to HTTPS requests.
///The default value is `true`.
///
- ///**NOTE for iOS**: available on iOS 14.5+.
+ ///**NOTE for iOS**: available on iOS 15.0+.
///
///**NOTE for MacOS**: available on MacOS 11.3+.
///
diff --git a/lib/src/in_app_webview/in_app_webview_settings.g.dart b/lib/src/in_app_webview/in_app_webview_settings.g.dart
index 4d046e0b..5169263c 100644
--- a/lib/src/in_app_webview/in_app_webview_settings.g.dart
+++ b/lib/src/in_app_webview/in_app_webview_settings.g.dart
@@ -1140,7 +1140,7 @@ class InAppWebViewSettings {
///A Boolean value indicating whether HTTP requests to servers known to support HTTPS should be automatically upgraded to HTTPS requests.
///The default value is `true`.
///
- ///**NOTE for iOS**: available on iOS 14.5+.
+ ///**NOTE for iOS**: available on iOS 15.0+.
///
///**NOTE for MacOS**: available on MacOS 11.3+.
///