Skip to main content
Inspiring
Nov 28, 2012 2:23 PM UTC
Answered

Setting UIInterfaceOrientation for my Adobe Air iOS app

Hi,

I tried adding UIInterfaceOrienation in my app.xml but it gives me "application.iPhone.InfoAdditions contains an invalid value" error when I try to create an iOS Package.


This is what the app.xml looks like

    <iPhone>

        <InfoAdditions>

            <![CDATA[

                              ...... other values

                               <key>UIInterfaceOrientation</key>

                               <string>UIInterfaceOrientationLandscapeRight</string>

               

                    ]]>

             </InfoAdditions>

         

Any ideas?

Thanks

This topic is closed to new replies. Start a new post to keep the conversation going.
mu_aCorrect answer
Inspiring
Nov 28, 2012 3:28 PM UTC

Ok, got an answer.

Apparently, we can't do this via the air packager (yet?)

The solution above will only work with in native development

contextView.stage.autoOrients = false;

contextView.stage.setOrientation(StageOrientation.ROTATED_LEFT);

contextView.stage.setOrientation(StageAspectRatio.LANDSCAPE);

does the trick

Note, that a ROTATED_LEFT makes it 'right side up'

1 reply

mu_aAuthorCorrect answer
Inspiring
Nov 28, 2012 3:28 PM UTC

Ok, got an answer.

Apparently, we can't do this via the air packager (yet?)

The solution above will only work with in native development

contextView.stage.autoOrients = false;

contextView.stage.setOrientation(StageOrientation.ROTATED_LEFT);

contextView.stage.setOrientation(StageAspectRatio.LANDSCAPE);

does the trick

Note, that a ROTATED_LEFT makes it 'right side up'

Translate