When I started my latest #iOSDev project a few months ago, I discovered that despite disabling the Portrait orientation in Xcode, my app kept rotating to portrait orientation on iPad. But looking at other apps out there, that's not supposed to happen. What's going on? [1/4]
Turns out, the Xcode UI for editing supported interface orientations in Info.plist is slightly broken. By default, the supported device checkboxes iPhone and iPad are checked for the default Target. But if you uncheck the portrait orientation, it silently fails ... [2/4]
... to uncheck it for iPhone and iPad (those are separate arrays in the .plist, as it turns out). To really disable portrait orientation for iPad from this UI, you need to first uncheck iPhone in the table above, then uncheck the portrait orientation boxes again. [3/4]
Now enable iPhone checkbox and voila, your app no longer allows portrait orientation on iPad. [4/4]
You can follow @_conath.
Tip: mention @twtextapp on a Twitter thread with the keyword “unroll” to get a link to it.

Latest Threads Unrolled: