Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

497902

Suspended
Original poster
Sep 25, 2010
905
229
I've noticed a bug with my app on my mother's old 1st gen iPad running iOS 5.1.1. The app supports 4 orientations and opens normally in portrait mode, but when I switch to landscape mode I can only flip the iPad, but can't go back to any portrait orientation. The problem seems to be on iOS 5.1.1 only since my iPad running iOS 7.0.3 doesn't have that issue, just like every iPad simulator Xcode has to offer.

I'm using Xcode 5.0.1. I have really no idea what's wrong here.
 

PhoneyDeveloper

macrumors 68040
Sep 2, 2008
3,114
93
There were changes in how iOS handles orientation changes. I guess those came in iOS 6. Did you remove the code that worked on iOS 5? Things like shouldAutorotateToInterfaceOrientation: are still needed for iOS 5 but not for iOS 6 and later.
 

497902

Suspended
Original poster
Sep 25, 2010
905
229
Thanks for the reply, I fixed the bug already by adding portrait orientation in a line of code that later iOS versions seem to ignore.
 

PhoneyDeveloper

macrumors 68040
Sep 2, 2008
3,114
93
Right, that's what I said.

So is this a new app written after iOS 5 was no longer current? Trying to add backward compatibility to an old version of the OS can be hard and certainly requires testing on a real device with the old OS.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.