iPad app rejected over orientation support

This week I submitted an app both as an iPhone app and as an iPad (essentially only changing the resolution of the graphics between the two versions). The iPhone app was accepted without any problems. The iPad app however was rejected not because of Lua, but because of ‘inadequate orientation’ support. Here’s some of the specific text:


"The iPad Human Interface Guidelines state that an iPad application should be able to run in all orientations. is only supporting one variant of the portrait orientation within the majority of the screens in your application. While we understand there are certain applications that need to run in the portrait orientation, it would be appropriate to support both variants of this orientation in your application.

Please note that supporting all four orientations, each with unique launch images, provides the best user experience and is recommended.
-----

I almost have the app updated to fully support all the orientations, but my support is based on responding to orientation change events. Is there a way to determine the initial orientation of the device before any orientation events happen? Or will the iPad always generate an orientation event if your app is not started while the iPad is in the ‘portrait’ orientation?

I don’t have a physical device yet to test on, so any help would be greatly appreciated. [import]uid: 4639 topic_id: 817 reply_id: 300817[/import]

Hi Steve, I would give it a shot. I don’t have an IPad but my IPod behaves this way. If I start the my current game upside down, according to by orintation event everything is rotated like I want it to be. [import]uid: 5712 topic_id: 817 reply_id: 1771[/import]

Pad Launch Image Orientations

Filename Dimensions
Default-Portrait.png * 768w x 1004h
Default-PortraitUpsideDown.png 768w x 1004h
Default-Landscape.png ** 1024w x 748h
Default-LandscapeLeft.png 1024w x 748h
Default-LandscapeRight.png 1024w x 748h
Default.png Not recommended

If you have not specified a Default-PortraitUpsideDown.png file, this file will take precedence.
** If you have not specified a Default-LandscapeLet.png or Default-LandscapeRight.png image file, this file will take precedence.

Also read :

http://developer.apple.com/iphone/library/documentation/General/Conceptual/iPadProgrammingGuide/CoreApplication/CoreApplication.html

Providing Launch Images for Different Orientations

[import]uid: 24 topic_id: 817 reply_id: 1780[/import]

we may need to add a function call that may be needed once the app starts to notify you of the orientation so that your app adjusts accordingly and lay them out properly.

we should have that asap

carlos [import]uid: 24 topic_id: 817 reply_id: 1782[/import]

A function to call on start up would be great. At the moment I just have blank background for the default image so orientation doesn’t matter much. But as soon as my program has control it dynamically generates some start up text. At this point I’m assuming ‘portrait’ orientation and then re-orientating when I get an orientation event. [import]uid: 4639 topic_id: 817 reply_id: 1789[/import]

Steve,

on the IPhone, the orientation event gets called right away so you can react on it there. It doesn’t react on the IPad???

In my game I have a general group called grpScene which I attach all other elements of the game to.
The onOrientationChange function deals with it. Inside I sate at state variable so I can get the orientation
in other functions.

Here is some code:

local orientationState = 0
grpScene = display.newGroup()
grpScene.xReference = centerwidth
grpScene.yReference = centerheight

–****************************************************************
local function onOrientationChange( event )
–****************************************************************
if event.type == “portraitUpsideDown” then
transition.to( grpScene, { time=150, rotation=180 } )
orientationState = 1
elseif event.type == “portrait” then
transition.to( grpScene, { time=150, rotation=0 } )
orientationState = 0
end
end

–****************************************************************
– Touch handler function
local onTouch = function( event )
–****************************************************************
if orientation == 1 then
event.x = screenwidth - event.x
event.y = screenheight - event.y
end

end

Runtime:addEventListener( “orientation”, onOrientationChange )
[import]uid: 5712 topic_id: 817 reply_id: 1790[/import]