Skip to content
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

Bug: [iOS] Orientation seems able to be changed now #165

Open
Xanonymous-GitHub opened this issue Jan 29, 2023 · 3 comments
Open

Bug: [iOS] Orientation seems able to be changed now #165

Xanonymous-GitHub opened this issue Jan 29, 2023 · 3 comments
Labels
scope: native type: bug Something isn't working
Milestone

Comments

@Xanonymous-GitHub
Copy link
Member

Describe the bug
The display orientation seems can be changed to landscape mode in all places, which is not allowed by our policy.

To Reproduce
Steps to reproduce the behavior:

  1. go to course table page
  2. check if it can show in landscape mode.

Expected behavior
not allowed landscape mode, except the video player page.

@Xanonymous-GitHub Xanonymous-GitHub added the type: bug Something isn't working label Jan 29, 2023
@Xanonymous-GitHub Xanonymous-GitHub added this to the 1.4.3 milestone Jan 29, 2023
@Xanonymous-GitHub Xanonymous-GitHub self-assigned this Jan 29, 2023
@github-project-automation github-project-automation bot moved this to Todo in TATAPP Jan 29, 2023
@Xanonymous-GitHub Xanonymous-GitHub changed the title Bug: Orientation seems able to be changed now Bug: [iOS] Orientation seems able to be changed now Feb 12, 2023
@Xanonymous-GitHub
Copy link
Member Author

The problem is that even we used the SystemChrome.setPreferredOrientations([DeviceOrientation.portraitUp]);, the orientation is still able to be changed in iOS devices. There's a workaround: restrict the config to only the portrait mode in the Info.plist file, but that makes we can't change the orientation while we need it (the video player page.)

@Xanonymous-GitHub Xanonymous-GitHub moved this from Todo to In Progress in TATAPP Feb 12, 2023
@Xanonymous-GitHub
Copy link
Member Author

Xanonymous-GitHub commented Feb 12, 2023

This is insane. Requested to dive into the native flutter code.
Native code land point: the SystemMethodChannel for the setPreferredOrientations method call. (iOS)

Flutter 3.7.2

  static Future<void> setPreferredOrientations(List<DeviceOrientation> orientations) async {
    await SystemChannels.platform.invokeMethod<void>(
      'SystemChrome.setPreferredOrientations',
      _stringify(orientations),
    );
  }

@Xanonymous-GitHub Xanonymous-GitHub moved this from In Progress to Todo in TATAPP Feb 15, 2023
@Xanonymous-GitHub Xanonymous-GitHub modified the milestones: 1.4.3, 1.5 Feb 15, 2023
@Xanonymous-GitHub Xanonymous-GitHub removed their assignment Aug 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
scope: native type: bug Something isn't working
Projects
Status: Todo
Development

No branches or pull requests

1 participant