possible fix for #1894

This commit is contained in:
Lorenzo Pichilli 2023-12-05 19:48:24 +01:00
parent e44c31b456
commit beb827858f
6 changed files with 28 additions and 14 deletions

View File

@ -1,3 +1,7 @@
## 1.0.6
- Possible fix for "iOS Fatal Crash" [#1894](https://github.com/pichillilorenzo/flutter_inappwebview/issues/1894)
## 1.0.5 ## 1.0.5
- Call `super.dispose();` on `InAppBrowser` and `ChromeSafari` implementations - Call `super.dispose();` on `InAppBrowser` and `ChromeSafari` implementations

View File

@ -2042,14 +2042,17 @@ public class InAppWebView: WKWebView, UIScrollViewDelegate, WKUIDelegate,
return return
} }
if let scheme = challenge.protectionSpace.protocol, scheme == "https" {
// workaround for ProtectionSpace SSL Certificate // workaround for ProtectionSpace SSL Certificate
// https://github.com/pichillilorenzo/flutter_inappwebview/issues/1678 // https://github.com/pichillilorenzo/flutter_inappwebview/issues/1678
DispatchQueue.global(qos: .background).async { DispatchQueue.global(qos: .background).async {
if let scheme = challenge.protectionSpace.protocol, scheme == "https", if let sslCertificate = challenge.protectionSpace.sslCertificate {
let sslCertificate = challenge.protectionSpace.sslCertificate { DispatchQueue.main.async {
InAppWebView.sslCertificatesMap[challenge.protectionSpace.host] = sslCertificate InAppWebView.sslCertificatesMap[challenge.protectionSpace.host] = sslCertificate
} }
} }
}
}
let callback = WebViewChannelDelegate.ReceivedServerTrustAuthRequestCallback() let callback = WebViewChannelDelegate.ReceivedServerTrustAuthRequestCallback()
callback.nonNullSuccess = { (response: ServerTrustAuthResponse) in callback.nonNullSuccess = { (response: ServerTrustAuthResponse) in

View File

@ -1,6 +1,6 @@
name: flutter_inappwebview_ios name: flutter_inappwebview_ios
description: iOS implementation of the flutter_inappwebview plugin. description: iOS implementation of the flutter_inappwebview plugin.
version: 1.0.5 version: 1.0.6
homepage: https://inappwebview.dev/ homepage: https://inappwebview.dev/
repository: https://github.com/pichillilorenzo/flutter_inappwebview/tree/master/flutter_inappwebview_ios repository: https://github.com/pichillilorenzo/flutter_inappwebview/tree/master/flutter_inappwebview_ios
issue_tracker: https://github.com/pichillilorenzo/flutter_inappwebview/issues issue_tracker: https://github.com/pichillilorenzo/flutter_inappwebview/issues

View File

@ -1,3 +1,7 @@
## 1.0.4
- Possible fix for "iOS Fatal Crash" [#1894](https://github.com/pichillilorenzo/flutter_inappwebview/issues/1894)
## 1.0.3 ## 1.0.3
- Call `super.dispose();` on `InAppBrowser` implementation - Call `super.dispose();` on `InAppBrowser` implementation

View File

@ -1424,14 +1424,17 @@ public class InAppWebView: WKWebView, WKUIDelegate,
return return
} }
if let scheme = challenge.protectionSpace.protocol, scheme == "https" {
// workaround for ProtectionSpace SSL Certificate // workaround for ProtectionSpace SSL Certificate
// https://github.com/pichillilorenzo/flutter_inappwebview/issues/1678 // https://github.com/pichillilorenzo/flutter_inappwebview/issues/1678
DispatchQueue.global(qos: .background).async { DispatchQueue.global(qos: .background).async {
if let scheme = challenge.protectionSpace.protocol, scheme == "https", if let sslCertificate = challenge.protectionSpace.sslCertificate {
let sslCertificate = challenge.protectionSpace.sslCertificate { DispatchQueue.main.async {
InAppWebView.sslCertificatesMap[challenge.protectionSpace.host] = sslCertificate InAppWebView.sslCertificatesMap[challenge.protectionSpace.host] = sslCertificate
} }
} }
}
}
let callback = WebViewChannelDelegate.ReceivedServerTrustAuthRequestCallback() let callback = WebViewChannelDelegate.ReceivedServerTrustAuthRequestCallback()
callback.nonNullSuccess = { (response: ServerTrustAuthResponse) in callback.nonNullSuccess = { (response: ServerTrustAuthResponse) in

View File

@ -1,6 +1,6 @@
name: flutter_inappwebview_macos name: flutter_inappwebview_macos
description: macOS implementation of the flutter_inappwebview plugin. description: macOS implementation of the flutter_inappwebview plugin.
version: 1.0.3 version: 1.0.4
homepage: https://inappwebview.dev/ homepage: https://inappwebview.dev/
repository: https://github.com/pichillilorenzo/flutter_inappwebview/tree/master/flutter_inappwebview_macos repository: https://github.com/pichillilorenzo/flutter_inappwebview/tree/master/flutter_inappwebview_macos
issue_tracker: https://github.com/pichillilorenzo/flutter_inappwebview/issues issue_tracker: https://github.com/pichillilorenzo/flutter_inappwebview/issues