diff --git a/flutter_inappwebview_ios/CHANGELOG.md b/flutter_inappwebview_ios/CHANGELOG.md index 4570737d..ebe7f664 100644 --- a/flutter_inappwebview_ios/CHANGELOG.md +++ b/flutter_inappwebview_ios/CHANGELOG.md @@ -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 - Call `super.dispose();` on `InAppBrowser` and `ChromeSafari` implementations diff --git a/flutter_inappwebview_ios/ios/Classes/InAppWebView/InAppWebView.swift b/flutter_inappwebview_ios/ios/Classes/InAppWebView/InAppWebView.swift index 701a3f41..e3deed4b 100755 --- a/flutter_inappwebview_ios/ios/Classes/InAppWebView/InAppWebView.swift +++ b/flutter_inappwebview_ios/ios/Classes/InAppWebView/InAppWebView.swift @@ -2042,12 +2042,15 @@ public class InAppWebView: WKWebView, UIScrollViewDelegate, WKUIDelegate, return } - // workaround for ProtectionSpace SSL Certificate - // https://github.com/pichillilorenzo/flutter_inappwebview/issues/1678 - DispatchQueue.global(qos: .background).async { - if let scheme = challenge.protectionSpace.protocol, scheme == "https", - let sslCertificate = challenge.protectionSpace.sslCertificate { - InAppWebView.sslCertificatesMap[challenge.protectionSpace.host] = sslCertificate + if let scheme = challenge.protectionSpace.protocol, scheme == "https" { + // workaround for ProtectionSpace SSL Certificate + // https://github.com/pichillilorenzo/flutter_inappwebview/issues/1678 + DispatchQueue.global(qos: .background).async { + if let sslCertificate = challenge.protectionSpace.sslCertificate { + DispatchQueue.main.async { + InAppWebView.sslCertificatesMap[challenge.protectionSpace.host] = sslCertificate + } + } } } diff --git a/flutter_inappwebview_ios/pubspec.yaml b/flutter_inappwebview_ios/pubspec.yaml index 4bc8f33e..fd11fd00 100644 --- a/flutter_inappwebview_ios/pubspec.yaml +++ b/flutter_inappwebview_ios/pubspec.yaml @@ -1,6 +1,6 @@ name: flutter_inappwebview_ios description: iOS implementation of the flutter_inappwebview plugin. -version: 1.0.5 +version: 1.0.6 homepage: https://inappwebview.dev/ repository: https://github.com/pichillilorenzo/flutter_inappwebview/tree/master/flutter_inappwebview_ios issue_tracker: https://github.com/pichillilorenzo/flutter_inappwebview/issues diff --git a/flutter_inappwebview_macos/CHANGELOG.md b/flutter_inappwebview_macos/CHANGELOG.md index d8837312..0370a153 100644 --- a/flutter_inappwebview_macos/CHANGELOG.md +++ b/flutter_inappwebview_macos/CHANGELOG.md @@ -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 - Call `super.dispose();` on `InAppBrowser` implementation diff --git a/flutter_inappwebview_macos/macos/Classes/InAppWebView/InAppWebView.swift b/flutter_inappwebview_macos/macos/Classes/InAppWebView/InAppWebView.swift index 393417a3..25ecf460 100755 --- a/flutter_inappwebview_macos/macos/Classes/InAppWebView/InAppWebView.swift +++ b/flutter_inappwebview_macos/macos/Classes/InAppWebView/InAppWebView.swift @@ -1424,12 +1424,15 @@ public class InAppWebView: WKWebView, WKUIDelegate, return } - // workaround for ProtectionSpace SSL Certificate - // https://github.com/pichillilorenzo/flutter_inappwebview/issues/1678 - DispatchQueue.global(qos: .background).async { - if let scheme = challenge.protectionSpace.protocol, scheme == "https", - let sslCertificate = challenge.protectionSpace.sslCertificate { - InAppWebView.sslCertificatesMap[challenge.protectionSpace.host] = sslCertificate + if let scheme = challenge.protectionSpace.protocol, scheme == "https" { + // workaround for ProtectionSpace SSL Certificate + // https://github.com/pichillilorenzo/flutter_inappwebview/issues/1678 + DispatchQueue.global(qos: .background).async { + if let sslCertificate = challenge.protectionSpace.sslCertificate { + DispatchQueue.main.async { + InAppWebView.sslCertificatesMap[challenge.protectionSpace.host] = sslCertificate + } + } } } diff --git a/flutter_inappwebview_macos/pubspec.yaml b/flutter_inappwebview_macos/pubspec.yaml index c4e72d3b..33732b60 100644 --- a/flutter_inappwebview_macos/pubspec.yaml +++ b/flutter_inappwebview_macos/pubspec.yaml @@ -1,6 +1,6 @@ name: flutter_inappwebview_macos description: macOS implementation of the flutter_inappwebview plugin. -version: 1.0.3 +version: 1.0.4 homepage: https://inappwebview.dev/ repository: https://github.com/pichillilorenzo/flutter_inappwebview/tree/master/flutter_inappwebview_macos issue_tracker: https://github.com/pichillilorenzo/flutter_inappwebview/issues