0

i'm trying to update an application for iOS 6. So i run it with the 6.0 Simulator to see if i get any errors or warnings, but there aren't any. But in fact i was expecting to get a warning for shouldAutorotateToInterfaceOrientation: because it's deprecated in iOS 6. Why don't i get a warning? Do i need to do something else than running it with a 6.0 simulator?

Thanks guys!

patman
  • 2,780
  • 4
  • 30
  • 54
  • 1
    This method is deprecated in iOS 6. [Solution is here](http://stackoverflow.com/questions/12520030/how-to-force-a-uiviewcontroller-to-portait-orientation-in-ios-6/12522119#12522119) – Mehul Mistri Nov 28 '12 at 12:58
  • i know that is depracated, that's what i was saying. i was wondering why i didn't get a warning of it being depracated. i think Kamboo answered it correctly – patman Nov 28 '12 at 13:26

3 Answers3

0

deprecated warning comes when you call deprecated function byself. as shouldAutorotateToInterfaceOrientation: is in view hierarchy in iOS5 but not in iOS6 so when you build app for iOS6 this function behave like normal view controller function and not consider in view life cycle. That's why warning not shown by xCode.

Siddiq
  • 393
  • 2
  • 8
  • 1
    Hi thanks for the answer, that's probably it. Do you know if there is any way to detect such depreciations automatically via xcode? – patman Nov 28 '12 at 13:24
0

The warning won't come in the Simulator, it will come in Xcode. Try setting your "Deployment Target" to 6.0 in Xcode and the warning should appear.

nevan king
  • 112,709
  • 45
  • 203
  • 241
0

If your app is deployed only for iOS6, you will see that warning, otherwise, you should implement both methods (shouldAutorotateToInterfaceOrientation for pre-iOS6 & shouldAutorotate for iOS6)

MuhammadBassio
  • 1,590
  • 10
  • 13
  • Actually this is not true. I've set the target to 6.0 and still not getting any warnings. See Kamboos answer, i think he's right. – patman Nov 28 '12 at 13:43