diff --git a/CHANGELOG.md b/CHANGELOG.md index 7902a962..c9499daa 100755 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,7 @@ - Fixed Android `PullToRefreshController.setEnabled` at runtime - Fixed iOS `findNext` - Fixed Android `RendererPriorityPolicy.waivedWhenNotVisible` type 'Null' is not a subtype of type 'bool' +- Fixed iOS 14.0 crash when calling `callAsyncJavaScript` method ## 5.4.4+3 diff --git a/ios/Classes/InAppWebViewMethodHandler.swift b/ios/Classes/InAppWebViewMethodHandler.swift index fe45528d..a908a9a0 100644 --- a/ios/Classes/InAppWebViewMethodHandler.swift +++ b/ios/Classes/InAppWebViewMethodHandler.swift @@ -417,7 +417,7 @@ public class InAppWebViewMethodHandler: FlutterMethodCallDelegate { break case "callAsyncJavaScript": if let webView = webView, #available(iOS 10.3, *) { - if #available(iOS 14.0, *) { + if #available(iOS 14.3, *) { // on iOS 14.0, for some reason, it crashes let functionBody = arguments!["functionBody"] as! String let functionArguments = arguments!["arguments"] as! [String:Any] var contentWorld = WKContentWorld.page diff --git a/lib/src/in_app_webview/in_app_webview_controller.dart b/lib/src/in_app_webview/in_app_webview_controller.dart index b2be39c4..ece08df9 100644 --- a/lib/src/in_app_webview/in_app_webview_controller.dart +++ b/lib/src/in_app_webview/in_app_webview_controller.dart @@ -2218,7 +2218,7 @@ class InAppWebViewController { ///This parameter doesn’t apply to changes you make to the underlying web content, such as the document’s DOM structure. ///Those changes remain visible to all scripts, regardless of which content world you specify. ///For more information about content worlds, see [ContentWorld]. - ///Available on iOS 14.0+. + ///Available on iOS 14.3+. /// ///**NOTE**: This method shouldn't be called in the [WebView.onWebViewCreated] or [WebView.onLoadStart] events, ///because, in these events, the [WebView] is not ready to handle it yet.