Skip to main content
Inspiring
November 28, 2012
Answered

Setting UIInterfaceOrientation for my Adobe Air iOS app

  • November 28, 2012
  • 1 reply
  • 619 views

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 has been closed for replies.
Correct answer mu_a

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
November 28, 2012

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'