Supported Interface Orientations

Monkey Targets Forums/iOS/Supported Interface Orientations

OvineByDesign(Posted 2011) [#1]
After editing the plist file, I set the Supported Interface Orientations to a landscape setting.

Indeed the app starts in that orientation but alas monkey doesn't seem to like it i.e. a white screen nothing else.


Has anyone else got their app to start in landscape mode (with other orientations disabled)


DGuy(Posted 2011) [#2]
(after stepping through the source code for a couple of hours...)

The issue seems to be that under certain circumstances (such as when supporting only landscape orientations) iOS will call upon Monkey before Monkey has initialized itself.

The fix is to move the call to 'bb_std_main()' from the bottom of 'didFinishLaunchingWithOptions' (located in 'mojo.ios.cpp' ) to the top. This will ensure Monkey is always ready to go should iOS call upon it while setting-up/sorting-out its' own views/orientation/etc.

From stepping through all the code invoked as a result of calling 'bb_std_main()', is appears Monkey does not expect the app to be setup anymore than it already is at the very start of 'didFinishLaunchingWithOptions' so it seems there is no harm in moving Monkeys' initialization up.

(also posting this to the Bugs forum topic)