Change orientation only once (on start)

Hi!

Our app has been rejected for not supporting both variants of portrait orientation.

The app is an interactive book, there are tilt based gravity games on some pages so I didn’t originally plan to support any additional orientations.

But they posted me twice about iOS Human Interface Guidelines. And really there is a paragraph about it:

If your application interprets changes in device orientation as user input, you can handle rotation in app-specific ways. For example, if your app is a game that allows people to move game pieces by rotating the device, you can’t respond to device rotation by rotating the screen. In a case like this, you should launch in either variant of your required orientation and allow people to switch between the variants until they start the main task of the application. Then, as soon as people begin the main task, you can begin responding to device movement in application-specific ways.
https://developer.apple.com/library/ios/#documentation/UserExperience/Conceptual/MobileHIG/UEBestPractices/UEBestPractices.html#//apple_ref/doc/uid/TP40006556-CH20-SW19

I suppose there’s no ability to lock the orientation change when an app is running (e.g. on specific pages of a book).

Is it possible to start app in one of the supported orientations (e.g. portrait or portraitUpsideDown) and never change it afterwards?

Please, it’s really showstopping :slight_smile: [import]uid: 13989 topic_id: 21446 reply_id: 321446[/import]

Try to use the accelerometer instead of the orientation for interactivity
Do not provide the alternatives in the build.settings file that way you will have a fixed orientation that will never change. [import]uid: 3826 topic_id: 21446 reply_id: 84926[/import]

JayantV, thanks for reply.
Sorry, I’m not sure what you mean by
use the accelerometer instead of the orientation for interactivity

I use a common code like

function onTilt( event )   
 physics.setGravity( 9.8 \* event.xGravity, 9.8 \* event.yGravity )  
end  
Runtime:addEventListener( "accelerometer", onTilt )  

It’s like Labyrinth game, where the real gravity is simulated and it changes as you tilt the device. The orientation has to be locked in this kind of games.

The thing is Apple won’t accept the app that supports only one orientation.

This is feature request: to be able to change orientation only once on start and then lock it. [import]uid: 13989 topic_id: 21446 reply_id: 85174[/import]