-
-
Notifications
You must be signed in to change notification settings - Fork 72
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
Fix iOS device orientation setup, honor the project settings #1375
Conversation
Cool, will do more testing and let ya know... |
Ok here are my findings: Uno 2.0.0-beta.5 + latest fuselibs (as of 28 Sep 2020) Mobile.OrientationsiOS 12 - Xcode 10.1 - iPhone 6
iOS 13/14 - Xcode 12.0.1 - iPhone SE
Trigger OrientationsiOS 12 - Xcode 10.1 - iPhone 6
iOS 12 - Xcode 12.0.1 - iPhone 6
iOS 13/14 - Xcode 12.0.1 - iPhone SE
Test App:
MainView.js:
|
Here's a good article on iOS orientation: https://useyourloaf.com/blog/upside-down-and-rotating-iphones |
Thank you for the detailed testing. I don't have iOS devices with iOS 12 so I can't take the test to see it by myself 🙏. Trigger OrientationsI'm curious about trigger orientation is not working on the ios 14 using Xcode 12. Have you tried opening / launching the testing app from the home screen, not from the XCode? because in my testing using iPhone XR iOS 14, launching from XCode indeed the trigger is not working, but when it launched directly from the home screen, the trigger works as intended. Do you have the same experience? Here is the screen recording, launching the app from the home screen, and everything works perfectly: https://drive.google.com/file/d/1xuwGK1OvTquWVQ6AENAWnmTHP-edBSAF/view?usp=sharing I don't know if is because I'm using the iPhone X series. I'll try to take a test again tomorrow using iPhone 7 in my office. And the tests that you have been done on iOS 12 - Xcode 12.0.1 - iPhone 6 that crashed miserably because it doesn't know about the Mobile.OrientationsIn my test when I also notice that when you set The issue I think is in the template of My guess that because of this, the test that have you been done on the iPhone 6 ios 12 using Xcode 10 got crashed when setting up to |
@ichan-mb Regarding conditional compiling, I think we'll also need a run-time test to see if we're running on iOS 13 (apps compiled using iOS 13 SDK can still be run on older iOS versions). Something like this might work.
Note that the |
Round 2 Trigger Orientations
Mobile.Orientations
Portrait value discussionSo there's a "Landscape" value thats supposed to represent both LandscapeLeft and LandscapeRight. In the same vein, "Portrait" is trying to represent both "Portrait" and "Upside Down". I think this is done in error as when you just want to restrict to only Portrait, you won't be able to. What do you guys think of the value "PortraitUpsideDown" for the combo of "Portrait" and "Upside Down", then Portrait represents just Portrait and UpsideDown represents Upside Down? |
So to confirm, the difference between "Xcode testing" and "home screen testing" feels like compile-time vs run-time checking? Compile time checking: |
Android case-insensitive version for: https://github.com/fuse-open/uno/blob/6aa9bf8c65c7bce7a23bdebe5ed1d7b216929d7d/lib/UnoCore/Targets/Android/app/src/main/AndroidManifest.xml#L103
|
iOS case-insensitive version for: https://github.com/fuse-open/uno/blob/c3a98bb5138419348cc9170f7c5352e2b9accdad/lib/UnoCore/Targets/iOS/%40(Project.Name)/%40(Project.Name)-Info.plist#L54
|
Updated my round 2 findings as I realised I was testing with the wrong Uno. |
Code for SystemUI.uno:
|
Trigger OrientationsOk tested Xcode 12
Mobile.OrientationsI guess we can fix them in another PR, seeing how the naming logic is broken for when we just want Portrait, we could add another value called "PortraitOnly". |
Is this PR ready to be merged now? |
Its just upside down orientation not working on iOS12 but if y'all ok with that for now, then we're good to go. |
This is a regression fix for a feature introduced in #1354. The bugs reported here: #1374
This PR contains: