i am creating a iPad app which supports the ios versions 5 and 6. I have a view controller which is shown at the start of the application only in portrait mode. Later i have a view controller which supports all interface orientations.
I just get it to work on iOS 5 or on iOS 6. Meaning: On iOS 6 the interface orientations supported in a view controller are only working if they are also set in the info.plist file. So i have to set all interface orientations in the info.plist file. It all works on iOS 6 but on iOS 5 it works on startup if the iPad is in Portrait before app start. But if the iPad is in Landscape the app starts in the right way but the notification center is wrong until you perform another rotation manually.
Is there a way to put some other keys in the info.plist file for another iOS version? That's the only solution i can think of. Because if i set only portrait as orientation in the info.plist file it works in iOS 5.
EDIT:
Okay, i explained it a bit confusing. I have get it to work fully in iOS 6 with the methods: shouldAutorotate and supportedInterfaceOrientations:. My Root View Controller just supports Portrait Interface Orientation and in my info.plist i had to select all interface orientations.
The problem:
When i start the App on iOS 5 holding my iPad in Landscape:
The Root View Controller is in Portrait Mode, but the App behaves like it would be in Landscape mode meaning the notification center can be accessed from the side and so on.
My solutions i can think of:
The problem is that i had to set all interface orientations in the info.plist file. That means in iOS 5 the app tries to start in Landscape mode (behavior explained above) even if i just put one possible orientation in the method shouldAutorotateToInterfaceOrientation: .
So there would be 2 solutions: I can make the app rotate in iOS 6 when the specific interface orientation is not selected in the info.plist file or i can "change" the rotation for iOS 5.
Hope you can help me.