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,12 +2042,15 @@ public class InAppWebView: WKWebView, UIScrollViewDelegate, WKUIDelegate,
return return
} }
// workaround for ProtectionSpace SSL Certificate if let scheme = challenge.protectionSpace.protocol, scheme == "https" {
// https://github.com/pichillilorenzo/flutter_inappwebview/issues/1678 // workaround for ProtectionSpace SSL Certificate
DispatchQueue.global(qos: .background).async { // https://github.com/pichillilorenzo/flutter_inappwebview/issues/1678
if let scheme = challenge.protectionSpace.protocol, scheme == "https", DispatchQueue.global(qos: .background).async {
let sslCertificate = challenge.protectionSpace.sslCertificate { if let sslCertificate = challenge.protectionSpace.sslCertificate {
InAppWebView.sslCertificatesMap[challenge.protectionSpace.host] = sslCertificate DispatchQueue.main.async {
InAppWebView.sslCertificatesMap[challenge.protectionSpace.host] = sslCertificate
}
}
} }
} }

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,12 +1424,15 @@ public class InAppWebView: WKWebView, WKUIDelegate,
return return
} }
// workaround for ProtectionSpace SSL Certificate if let scheme = challenge.protectionSpace.protocol, scheme == "https" {
// https://github.com/pichillilorenzo/flutter_inappwebview/issues/1678 // workaround for ProtectionSpace SSL Certificate
DispatchQueue.global(qos: .background).async { // https://github.com/pichillilorenzo/flutter_inappwebview/issues/1678
if let scheme = challenge.protectionSpace.protocol, scheme == "https", DispatchQueue.global(qos: .background).async {
let sslCertificate = challenge.protectionSpace.sslCertificate { if let sslCertificate = challenge.protectionSpace.sslCertificate {
InAppWebView.sslCertificatesMap[challenge.protectionSpace.host] = sslCertificate DispatchQueue.main.async {
InAppWebView.sslCertificatesMap[challenge.protectionSpace.host] = sslCertificate
}
}
} }
} }

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