From 42743f23eb11191f07d36be3c2e0db2b7188559f Mon Sep 17 00:00:00 2001 From: Le Minh Hoang Date: Sun, 24 Oct 2021 23:11:21 +0700 Subject: [PATCH] fix. Crash happens when HeadlessInAppWebView's dispose function is called in iOS --- ios/Classes/HeadlessInAppWebView/HeadlessInAppWebView.swift | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ios/Classes/HeadlessInAppWebView/HeadlessInAppWebView.swift b/ios/Classes/HeadlessInAppWebView/HeadlessInAppWebView.swift index 6fb9a1be..4bfa9e75 100644 --- a/ios/Classes/HeadlessInAppWebView/HeadlessInAppWebView.swift +++ b/ios/Classes/HeadlessInAppWebView/HeadlessInAppWebView.swift @@ -21,6 +21,10 @@ public class HeadlessInAppWebView : FlutterMethodCallDelegate { self.channel?.setMethodCallHandler(self.handle) } + deinit { + dispose() + } + public override func handle(_ call: FlutterMethodCall, result: @escaping FlutterResult) { let arguments = call.arguments as? NSDictionary