Skip to content

☂️ Umbrella issue for replace deprecated [UIScreen mainScreen] in iOS 16 #125496

@gaaclarke

Description

@gaaclarke

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 replacement UiWindowScene 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:

File Name Tracking Issue
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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Important issues not at the top of the work listc: tech-debtTechnical debt, code quality, testing, etc.engineflutter/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