-
Notifications
You must be signed in to change notification settings - Fork 984
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
builds with cordova-ios@6.0.0 are locked in portrait view #899
Comments
We merged some fixes for splashscrens, can you test the current master and see if the problem is already fixed? You can do so by adding the platform via |
@timbru31 I am currently using the master branch of cordova-ios and experiencing the same issue. (only tested in the ios simulator though) |
same problem when i'm use v 6.0.0 and 6.1.0-dev |
@eradin There has been a PR merged into the master branch, that fixed the fast disappearing splash screen error. For me using the master branch solved my splash screen problems. Keep in mind using the master branch is not recommended for production. |
For iOS you should use the preference for orientation and set value to all like this This will set when cordova add the platform and tell the platform for iOS to make all possible orientation for iOS devices. Please note: In the past, if you don't use the preference orientation with value all or even if you omit this preference, the orientation was set for both landscape and portrait mode (like Android), but recently you should use the preference orientation with value all to see both orientation modes. |
@mosabab Thank you very much, that works for me 👍 |
@mosabab Shouldn't this be the default? It has been on prior versions. |
The default is the Xcode default, I believe.
https://cordova.apache.org/docs/en/latest/config_ref/index.html |
@breautek That's fine but what if you don't include this directive? From everything I can find online, the ios default has always been "all" (same with android). So are you saying that the default WKWEBVIEW orientation is portrait? If that's the case, then to get "traditional legacy behavior", this directive would be mandatory. This seems odd to me as the behavior is in contrary to all previous views (i.e. UIWEBVIEW) and ios versions. |
Then it defaults to
All I'm saying is that Cordova's default is to let Xcode (or Android SDK for android) decide what the default should be and not I don't know if this is the exact reason for the change of behaviour between cordova-ios@5 and cordova-ios@6, or between UIWebView & WKWebView. If I were to make a guess, I would think it's the difference between Xcode versions... but this is something that I think should be investigated to confirm it is indeed a regression. |
Thanks for the clarification. "but this is something that I think should be investigated to confirm it is indeed a regression". Indeed. |
I believe #615 is what caused this. I also believe that using the platform defaults by default is the behaviour that we want, and people should use the |
@eradin |
Additional information: I have another issue like what you mentioned here. I was put the the preference for statusbarstyle to lightcontent or just i omit this preference (because the default value in doc is lightconent https://github.com/apache/cordova-plugin-statusbar#configxml) , and i see that Xcode always read the statusbar style to dark content (dark text, for light background). So, I change the statusbar style manually to make light content instead of dark, because this preference So to fix this issue i do it manually by JS code like this:
For that reason i open a new issue apache/cordova-plugin-statusbar#192 regarding this problem. |
Just double checked what a newly-created iOS project has as defaults in Xcode, and it does specify certain default rotations: <key>UISupportedInterfaceOrientations</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
<key>UISupportedInterfaceOrientations~ipad</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationPortraitUpsideDown</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array> |
This will be fixed when 6.1.0 is released. |
Bug Report
Problem
Build with V6.0.0, splash screen and app will always be in portrait view even when device is in landscape orientation.
What is expected to happen?
Iphone and ipad should reorient app based on orientation.
Environment, Platform, Device
Confirmed on ipad 6th gen, IOS 13
Version information
cordova 9 cli
cordova-ios 6.0.0
Checklist
The text was updated successfully, but these errors were encountered: