diff --git a/ios/Podfile b/ios/Podfile index 8eaa995..3da15a0 100644 --- a/ios/Podfile +++ b/ios/Podfile @@ -1,5 +1,5 @@ # Uncomment this line to define a global platform for your project -platform :ios, '12.0' +platform :ios, '14.0' # CocoaPods analytics sends network stats synchronously affecting flutter build latency. ENV['COCOAPODS_DISABLE_STATS'] = 'true' diff --git a/ios/Runner/AppDelegate.swift b/ios/Runner/AppDelegate.swift index d236fa2..aa84a21 100644 --- a/ios/Runner/AppDelegate.swift +++ b/ios/Runner/AppDelegate.swift @@ -13,6 +13,10 @@ import UniformTypeIdentifiers ) -> Bool { GeneratedPluginRegistrant.register(with: self) + guard let controller = window?.rootViewController as? FlutterViewController else { + fatalError("rootViewController is not of type FlutterViewController") + } + let methodChannel = FlutterMethodChannel(name: "venera/method_channel", binaryMessenger: controller.binaryMessenger) methodChannel.setMethodCallHandler { (call, result) in if call.method == "getProxy" {