-
Notifications
You must be signed in to change notification settings - Fork 28.6k
☂️ Umbrella issue for replace deprecated [UIScreen mainScreen]
in iOS 16
#125496
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Instead of a adding a new deprecated API usage can you instead use See https://github.com/flutter/engine/blob/36730dd4e4b195cde399d500600c3536b1a07b83/shell/platform/darwin/ios/framework/Source/FlutterViewController.mm#L615-L623 for how the fallback is done in the |
@gaaclarke since you didn't introduce a new one in flutter/engine#41460 are there more places |
Yea, there is still quite a few instances.
|
[UIScreen mainScreen]
.[UIScreen mainScreen]
in iOS 16
Prep work being tracked in https://docs.google.com/document/d/1_a7RT1cWW4LjI3PNpJa2j5rete2llb6DKPlhK1vN2eo/edit?usp=sharing |
[UIScreen mainScreen]
in iOS 16[UIScreen mainScreen]
in iOS 16
Relates to #134062 |
Uh oh!
There was an error while loading. Please reload this page.
One instance was introduced in flutter/engine#41460
Use Case
UIScreen mainScreen
is deprecated in iOS 16 per https://developer.apple.com/documentation/uikit/uiscreen/deprecated_symbols. We should use the recommended replacementUiWindowScene
which was added in iOS 13 to support multiple windows and provide a fallback for iOS 11 & 12.Proposal
There are several places where the deprecated
UIScreen mainScreen
is used and should be replaced:FlutterViewController.mm
&FlutterViewControllerTest.mm
FlutterPlatformViews_Internal.mm
FlutterDartProject.mm
&FlutterDartProjectTest.mm
FlutterView.mm
vsync_waiter_ios.mm
SemanticsObject.mm
FlutterPlatformViews.mm
&FlutterPlatformViewsTest.mm
AppDelegate.m
Out of Scope
Currently, most Flutter behavior is built and tested for the single window. The simple replacement proposed in this issue may not address all multi-window scenario cases.
The text was updated successfully, but these errors were encountered: