Question

Yesterday I downloaded Xcode 4.5 with iOS 6 SDK and upgraded my Xcode. Also I have got an Cocos2D game app, which I built in Xcode 4.3 (with iOS 5 SDK)and released a few days ago in Appstore, everything works great on all versions of iOS.

Now, if I build this app on Xcode 4.5 with iOS 6 SDK the main view of Cocos2D is 90 degrees rotated. Why does building in different Xcode result different behavior? I have already make my app running on iOS 6 perfectly by not using -viewWillAutorotate and so on. What should I do, downgrade to Xcode 4.3 5 SDK? I completely misunderstand why my code should be so hard IDE-dependent.

Thanks in advance!

EDIT:

I figured out that the strange behavior only appears on simulator iOS 6, with 5 it works great...

Was it helpful?

Solution 2

I found two solutions: first, set Cocos2D CCDirector's deviceOrientation manually, and second, downgrade to Xcode 4.3 and iOS SDK 5. The second works on all iOS as I mentioned in question, I would appreciate if someone tells me what was the difference.

OTHER TIPS

In your Project in Xcode you probably need to set the orientations you support. Target > Summary. These select the ones you want: enter image description here

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top