Provide a way for iOS plugins to know what window/view to interact with #104117
Labels
a: plugins
Support for writing, building, and running plugin packages
c: new feature
Nothing broken; request for a new capability
engine
flutter/engine repository. See also e: labels.
P2
Important issues not at the top of the work list
platform-ios
iOS applications specifically
team-ios
Owned by iOS platform team
triaged-ios
Triaged by iOS platform team
Several of our 1P plugins present view controllers over the Flutter view;
GIDSignIn
needs this information, for example. Currently, we do this usingUIApplication.sharedApplication.keyWindow
, but in iOS 13keyWindow
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
The text was updated successfully, but these errors were encountered: