We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents d70cb45 + aca88cb commit a0ddb95Copy full SHA for a0ddb95
ios/Classes/FlutterWebviewPlugin.m
@@ -15,7 +15,7 @@ + (void)registerWithRegistrar:(NSObject<FlutterPluginRegistrar>*)registrar {
15
methodChannelWithName:CHANNEL_NAME
16
binaryMessenger:[registrar messenger]];
17
18
- UIViewController *viewController = (UIViewController *)registrar.messenger;
+ UIViewController *viewController = [UIApplication sharedApplication].delegate.window.rootViewController;
19
FlutterWebviewPlugin* instance = [[FlutterWebviewPlugin alloc] initWithViewController:viewController];
20
21
[registrar addMethodCallDelegate:instance channel:channel];
0 commit comments