fluttercommunity / fluttercommunity/flutter_webview_plugin
[iOS] Not working when rootViewController is not FlutterViewController
- 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
Research direction
Start at the registerWithRegistrar entry point shown in the issue and trace how the plugin obtains and uses the application's rootViewController. Reproduce the failure with a root view controller that is not a FlutterViewController; done means the iOS plugin works in that setup without breaking the existing registration path.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- ios, objective-c
- Domain
- mobile
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100