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

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.