fluttercommunity / fluttercommunity/flutter_webview_plugin

[iOS] Not working when rootViewController is not FlutterViewController

Open
#866 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
1.5k
Forks
938
PR merge metrics
No merged PRs in 30d

Description

## System info

Issue occurs on: both
Plugin version: all
Flutter doctor output: x

```objc
+ (void)registerWithRegistrar:(NSObject*)registrar {
channel = [FlutterMethodChannel
methodChannelWithName:CHANNEL_NAME
binaryMessenger:[registrar messenger]];

UIViewController *viewController = [UIApplication sharedApplication].delegate.window.rootViewController;
FlutterWebviewPlugin* instance = [[FlutterWebviewPlugin alloc] initWithViewController:viewController];

[registrar addMethodCallDelegate:instance channel:channel];
}
```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.