-
Notifications
You must be signed in to change notification settings - Fork 5.2k
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
[screen-orientation][ios] Screen Orientation module audit #22152
[screen-orientation][ios] Screen Orientation module audit #22152
Conversation
…negative values. Fix linting error
…sue with moduleDidBackground
…d to landscape. Add comment about the change to DevMenuWindow.swift. Reverse Info.plist changes
…and fixed SafeAreaView failing on rotation when no lock has been set
…ed SafeAreaView failing on rotation when no lock has been set
…it/migrate-to-swift' into @behenate/screen-orientation-audit/migrate-to-swift
…unnecessary workarounds
…unnecessary workarounds
…it/migrate-to-swift' into @behenate/screen-orientation-audit/migrate-to-swift # Conflicts: # packages/expo-screen-orientation/ios/EXScreenOrientation/ScreenOrientationAppDelegate.swift
…es and minor code styling fixes and added some comments
Co-authored-by: Expo Bot <34669131+expo-bot@users.noreply.github.com>
Co-authored-by: Expo Bot <34669131+expo-bot@users.noreply.github.com>
@watadarkstar we don't build nightlies yet, but I'm going to publish some packages today, including |
@watadarkstar |
I couldn't seem to get this working when installing the pods, with SDK44 (bare workflow) - can't update at the moment unfortunately:
|
@liquidvisual |
Am able to rotate orientation using |
@singh-sukhmanjit What iOS version are you using, also are you using expo go or bare workflow? Code which you are using to lock the screen would be helpful too. |
@watadarkstar |
@behenate Am trying it on iPad (8th generation) iPadOS 16.1 with Expo SDK 48 bare workflow. Am using
|
@singh-sukhmanjit Have you set the "requireFullScreen" option to |
@behenate yes, it is set but still the behavior is same. |
still not work no ios 16.2 iphone simulator (bare workflow) xcode log
my env:
package.json
|
@jasonz1987 It is also possible that your As for the error it is most likely caused by |
Expo: "~48.0.15" app.json in orientation deleted app.json plugins in added await ScreenOrientation.lockAsync(ScreenOrientation.OrientationLock.LANDSCAPE); It works fine on the simulator but not on the real device, has anyone solved this problem? |
@ycldz Also please don't leave three identical comments in three different places |
@behenate unfortunately it doesn't work on expo 49 either. |
@behenate I save the code in the editor, the screen does not refresh on the device and the console.log code does not work thank you :D |
@ycldz Are you using managed or bare workflow? I tested in a bare workflow with this app https://github.com/behenate/screen-orientation-demo and it seems to be working fine |
The reproduction of this issue requires the simultaneous use of screen-orientation and react-navigation. |
Putting this feature on the page after the push will have a certain probability of recurring. |
Why
Screen Orientation module is written in old modules API.
Screen orientation doesn't work correctly on iOS 16+ #21974, #21044
Various minor bugs (see below).
ENG-8363
How
Migration: Followed the usual migration steps.
Bugfixes:
supportedInterfaceOrientationsFor
in AppDelegatesrequestOverlayMetricsIfNeeded
function. When in landscape mode the notch height would be returned as negative, which causes the assertion to fail. I corrected it to always return values greater or equal than zero.Here are some videos comparing old and new behaviours:
Old version is on the left, post-audit version is on the right. If the videos aren't loading try using Google Chrome.
2023-04-26.18-17-21.mov
2023-04-26.18-18-25.mov
2023-04-26.18-23-44.mov
2023-04-26.18-31-20.mov
Test Plan
Tested on simulator and physical devices (iOS 15 and 16).