Fixed iOS 14.0 crash when calling callAsyncJavaScript method
This commit is contained in:
parent
6abf958b31
commit
e46523aef3
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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.
|
||||
|
|
Loading…
Reference in New Issue