I am new to the cocos2d API and have noticed that there are a few ways to set the screens orientation within the templates. I have not been able to figure out the correct wa
The answer here has changed with cocos2d 2.0, as CCDirector is now a ViewController on iOS:
CCDirector no longer supports device orientation. All autorotation and device orientation is handled by RootViewController now. Fortunately, [[UIDevice currentDevice] orientation] can be used in place of [[CCDirector sharedDirector] deviceOrientation]. The enums are the same, except that they begin with UI instead of CC.
Forcing a specific orientation is a simple matter of returning YES only to the desired orientation in the RootViewController method shouldAutorotateToInterfaceOrientation.
Choosing between Cocos2D v1.x & 2.x and Tips for updating to Cocos2D 2.0 at learn-cocos2d.com