Xcode Device Orientation Setting is not working for iPad

Have you ever tried to set the device setting in Xcode but it never works?

Xcode Deployment Info

It does not work because if your target involves at lease 2 devices, in my case above it is iPhone and iPad, Xcode would separate the settings for you. They just, however, do not tell you in the Xcode UI.

The solution is follow:

If you want to change the device orientation setting for, let say, an iPad

iPad specific deployment setting

3. Apply the setting for iPad

4. Tick iPhone and/or Mac back to revert back to the status before (1)

Then the device orientation setting should be working again after Cmd+R ;)

Happy coding!

#iOS #Xcode #iPad #iPadOS #device #deviceorientation #orientation #deployment #setting #deploymentinfo #debug #m1 #Mac #swift #objc #development #iPhone #app

--

--

Hi this is Rick from Hong Kong. I am a native iOS and Android mobile developer and also a tech enthusiast. Find me on Twitter https://twitter.com/rick3817

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Rick_HK

Hi this is Rick from Hong Kong. I am a native iOS and Android mobile developer and also a tech enthusiast. Find me on Twitter https://twitter.com/rick3817