Portrait mode on iPad?

How do I configure an iPad app to only work in portrait mode?


In Xcode there are checkboxes for the four orientations, and only Portrait is checked, but the app still rotates into landscape mode.


I also tried checking the "Requires full screen" box, but this didn't have any effect.


Thanks,

Frank

I found this when I opened my info.plist file:


  <key>UISupportedInterfaceOrientations</key>
  <array>
  <string>UIInterfaceOrientationPortrait</string>
  </array>
  <key>UISupportedInterfaceOrientations~ipad</key>
  <array>
  <string>UIInterfaceOrientationPortrait</string>
  <string>UIInterfaceOrientationPortraitUpsideDown</string>
  <string>UIInterfaceOrientationLandscapeLeft</string>
  <string>UIInterfaceOrientationLandscapeRight</string>
  </array>


Is this some new thing where Xcode is forcing iPad apps to have all orientations or am I misunderstanding the UI? I don't see a way in the project settings to specify iPad orientations separately. I was able to solve my problem by editing this file manually.

Curious which launch images are in play...

I observed a strange behavior.


I had defined iPhone and iPad as targets.

With 4 orientations (cannot distinguish in Targets > General)


They did appear correct in pList.

If I removed some orientation, only iPhone entry was modified in plist.


So I selected iPad target only and removed orientations except Portrait

plist showed it corrctly.


But when I added back iPad, I could not get other orientations back for iPad.

I had to reintroduce by adding ➕ in the ipad orientation entry (directly in plist, no need to go to xml format).


Seems a bit buggy here.

Portrait mode on iPad?
 
 
Q