Skip to content

Provide a way for iOS plugins to know what window/view to interact with #104117

@stuartmorgan-g

Description

@stuartmorgan-g

Several of our 1P plugins present view controllers over the Flutter view; GIDSignIn needs this information, for example. Currently, we do this using UIApplication.sharedApplication.keyWindow, but in iOS 13 keyWindow is deprecated because of the introduction of scenes on iPads.

To make Flutter scene-friendly, we should provide an alternate way of getting that information. On the macOS embedding, for instance, I added a way to get the NSView of the Flutter content via the plugin registrar, which allows plugins to get the window they are part of for things like showing sheets. (I keep finding 3P plugins that ignore that and use the key window instead, but 🤷🏻 ). We should consider doing the same for iOS, or providing some alternate solution.

/cc @jmagman

Metadata

Metadata

Labels

P2Important issues not at the top of the work lista: pluginsSupport for writing, building, and running plugin packagesc: new featureNothing broken; request for a new capabilityengineflutter/engine related. See also e: labels.platform-iosiOS applications specificallyteam-iosOwned by iOS platform teamtriaged-iosTriaged by iOS platform team

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions