I need my app to only support portrait orientation. But after upgrading to iOS9, the orientation settings seem to have no effect. I have gone through this answer and here's my apps settings :
but still the app goes into landscape. what am I doing wrong?
Looks like I found the problem. When I viewed the source of my info.plist, this is what I found :
No Idea how the
UISupportedInterfaceOrientations~ipad
key came into being. It was not initially displayed when viewing as a property list, but started showing in property list after opened as source and saved.Also there seems to be now way to set this in the general tab. Thanks to SamB and technerd for putting me on the right path.
PS: I am not sure if this is a bug or the intended behavior, so I welcome any insights on this.
There is some sort of bug in iOS9. It completely overlooks the plist file orientation settings. So I had to add this code to each of my UIViewControllers to get portrait orientation.
Please check Info.plist for "Supported interface orientations". It must show Portrait for your requirement. Sometimes it is not updated as project settings in General Tab. If you find landscape orientation over here then remove it.