Similar question here and not a single working answer:
Xcode not obeying device orientation
it doesn’t matter how I change the settings in Xcode 13 but when I run my app, it completely ignores the device orientation settings.
I just want my app to be in portrait but it looks like I can go landscape (left/right) and any other orientations!
This is my settings:
info.plist file:
Manual settings under the deployment:
anyones got a solution for this as this is a very annoying bug in Xcode!
3
Answers
The ‘Device Orientation’ checkboxes seem to be broken in Xcode 13. They don’t modify the info.plist entries at all. Maybe this has to do with the new info.plist slim template that Apple introduced at WWDC 2021.
Manually adding
Supported device orientation (iPhone)
seems to do the trick. However, it will not be reflected in Xcode Deployment Info’s checkboxes.I’m not sure if this is correct, but it solves the problem and the Device orientation checkboxes work again. It looks like an Xcode bug. What you need to do – just delete
Supported interface orientations (iPhone)
inInfo.plist
and select the necessary checkboxes inGeneral
XCode screenshot:
Check
Only these values have real effect, and they may be different from all other Xcode project settings.