Skip to content

[CP] Always set orientation preferences on iOS 16+ #124208

@burghoffdavid

Description

@burghoffdavid

issue_link

#116711

Commit Hash

dd1dc7

Target

stable

pr_link

flutter/engine#40953

Impacted Users

iOS apps running iOS 16+ that should be locked to portrait.

Impact Description

Apps that were designed with only one orientation in mind currently break, since locking the orientation via Flutter is not working at the moment.

Workaround

None AFAIK

Risk

low

Test Coverage

yes

Validation Steps

  1. flutter create app

  2. Open it in XCode, check "Requires Full Screen"
    Screenshot 2023-04-05 at 16 23 01

  3. Add the following to main.dart

void main() {
  WidgetsFlutterBinding.ensureInitialized();
  SystemChrome.setPreferredOrientations([
    DeviceOrientation.portraitUp,
  ]);
  runApp(const MyApp());
}
  1. Launch App on any iPad running iOS 16+
  2. Check if orientation is locked (Landscape not possible)

Metadata

Metadata

Assignees

Labels

cp: approvedApproved cherry-pick requestcp: merge-to-stableCherry-picks that should be merged to stablecp: mergedCherry-pick has been merged to the release branch.cp: reviewCherry-picks in the review queue

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions