Skip navigation
Currently Being Moderated

AIR3 iOS Start Up Screen is messed up [HELP]

Jan 30, 2012 11:43 AM

I am including Default.png, Default-Landscape.png and Default-LanscapeRight.png

 

When I launch my application ( which only runs in landscape mode ) .. the correct splash screen shows for a split second .. then it switches to show it stretched and portrait.

 

What is causing this ?

 
Replies 1 2 Previous Next
  • Currently Being Moderated
    Feb 13, 2012 2:22 PM   in reply to Applauz78

    Hi, I had exactly the same problem today, I compiled project on another pc and it was all good. Maybe the problem is in air sdk version or some settings?

     
    |
    Mark as:
  • Currently Being Moderated
    Feb 14, 2012 1:08 AM   in reply to Applauz78

    This is not AIR issue ^) It's your isse. Don't include all images that you see.

     

    Firstly it show Default.png than Default-Landscape.png than Default-LanscapeRight.png and so on. May be in other order.

     

    Simple use 1 splash screen file. Not all at once. Try upload one Default-Landscape.png

     
    |
    Mark as:
  • Currently Being Moderated
    Feb 14, 2012 7:27 PM   in reply to Applauz78

    did you know the .png needs to always be in portrait demensions regardless of app orientation? meaning a landscape splash screen would be made in portrait with the artwork flipped 90 degrees.

     

    (width always less that height is what i mean to say)

     
    |
    Mark as:
  • Currently Being Moderated
    Feb 14, 2012 7:37 PM   in reply to boat5

    I double checked my files to make sure, and what you said isn't quite right. For a landscape only app you would need Default.png, 320x480, the landscape design on its side, 640x960, same again only twice the size. So far that's what you said, but the actual Default-Landscape.png for the iPad would be 1024x768, the landscape design the correct way up.

     
    |
    Mark as:
  • Currently Being Moderated
    Feb 14, 2012 8:32 PM   in reply to Colin Holgate

    woops sorry about that, I remembered needing to turn my png for the phone but didnt check my ipad splash size before posting.

     

    thanks colin

     
    |
    Mark as:
  • Currently Being Moderated
    Feb 14, 2012 9:25 PM   in reply to Applauz78

    What is the resolution of the image that you are using and for what device? Also, is the app meant to start in landscape or portrait only orientation or supports all device orientations?

     
    |
    Mark as:
  • Currently Being Moderated
    Feb 14, 2012 9:53 PM   in reply to Applauz78

    Hi , can you tell me if you are specifically using iPhoneOS 5.0 sdk to package this ipa ? 

     
    |
    Mark as:
  • Currently Being Moderated
    Feb 15, 2012 3:32 AM   in reply to Applauz78

    I'm using Default-Landscape 1024x768 and  Flash Professional CS5.5 for publishing. I publishec couple of apps before and never had those problems it appeared lately (maybe I messed something up with AIR sdk?). It also works fine on another PC with exactly the same project files - so I believe it's not about Default-Landscape.png size or orientation.

     
    |
    Mark as:
  • Currently Being Moderated
    Feb 15, 2012 8:09 AM   in reply to Applauz78

    Ok I investigated it a bit more and it looks like the problem is in adobe AIR SDK 3.1.

    I downloaded 3.0 version from here:

    http://airdownload.adobe.com/air/win/download/3.0/AdobeAIRSDK.zip

    and 3.1 from here:

    http://airdownload.adobe.com/air/win/download/3.1/AdobeAIRSDK.zip

    and used adt from version 3.1 and 3.0 to publish app using commands:

     

    SDK31/bin/adt -package -target ipa-test-interpreter -storetype pkcs12 -keystore YOUR_CERT.p12 -provisioning-profile YOUR_DEV_PROVISIONING.mobileprovision APPNAME.ipa APPNAME-app.xml APPNAME.swf Default-Landscape.png

     

    SDK30/bin/adt -package -target ipa-test-interpreter -storetype pkcs12 -keystore YOUR_CERT.p12 -provisioning-profile YOUR_DEV_PROVISIONING.mobileprovision APPNAME.ipa APPNAME-app.xml APPNAME.swf Default-Landscape.png

     

    version published using 3.0 works just fine, and the one using 3.1 makes splash screen rotates for a split second.

    Maybe it's a problem just when publishing to debug I'm not sure but it looks like AIR 3.1 SDK bug.

     
    |
    Mark as:
  • Currently Being Moderated
    Feb 23, 2012 3:23 AM   in reply to michal_tsign

    Having the same problem...

    Might give AIR 3.0 a try then, thanks!

     
    |
    Mark as:
  • Currently Being Moderated
    Feb 23, 2012 5:45 AM   in reply to boudewijndanser

    I investigated it a bit more because I had to use AIR 3.1

    if you're usig AIR SDK 3.1 you can set "Aspect ratio" in AIR for iOS settings panel to "Auto" (instead of for example landscape) then you have to attach both default images for landscape and portrait mode.

    this walkaround worked for me, but I hope Adobe will fix it in AIR 3.2

     
    |
    Mark as:
  • Currently Being Moderated
    Feb 23, 2012 5:59 AM   in reply to michal_tsign

    Hi michal , can you share your app.xml file with me  . Would help us to diagnose the issue . One more thing , are you using any native extensions ??

     
    |
    Mark as:
  • Currently Being Moderated
    Feb 24, 2012 4:32 PM   in reply to Applauz78

    I have exactly the same problem with AIR 3.1. I have a game that I need to lock in landscape view, but the splash screen flicker to portrait/stretched is a showstopper experience issue. I am using a couple native extensions. Here's my app.xml, with some names changed and comments removed...

     

    <?xml version="1.0" encoding="utf-8" standalone="no"?>

    <application xmlns="http://ns.adobe.com/air/application/3.1">

           <id>com.jdconley.mygame</id>

           <filename>MyGame</filename>

           <name>MyGame</name>

           <versionNumber>1.0.0</versionNumber>

      <initialWindow>

                <content>[This value will be overwritten by Flash Builder in the output app.xml]</content>

                <title>My Game</title>

                <systemChrome>none</systemChrome>

                <transparent>false</transparent>

                <visible>true</visible>

                <minimizable>false</minimizable>

               <maximizable>false</maximizable>

                <resizable>false</resizable>

                <aspectRatio>landscape</aspectRatio>

                <autoOrients>false</autoOrients>

                <fullScreen>true</fullScreen>

                <renderMode>cpu</renderMode>

                <softKeyboardBehavior>pan</softKeyboardBehavior>

        </initialWindow>

      <icon>

      <image29x29>29x29_Icon_2.png</image29x29>

      <image48x48>48x48_Icon_2.png</image48x48>

      <image57x57>57x57_Icon_2.png</image57x57>

      <image72x72>72x72_Icon_2.png</image72x72>

      <image114x114>114x114_Icon_2.png</image114x114>

      </icon>

     

      <iPhone>

            <InfoAdditions><![CDATA[

                                            <key>UIDeviceFamily</key>

                                            <array>

                                                           <string>1</string>

                                                           <string>2</string>

                                            </array>

                                            <key>UIApplicationExitsOnSuspend</key>

                                            <true/>

                <key>UIRequiresPersistentWiFi</key>

                                            <true/>

                                            <key>SBUsesNetwork</key>

                                            <true/>

                                            <key>UIRequiredDeviceCapabilities</key>

                                            <array>

                                                           <string>wifi</string>

                                            </array>

      ]]></InfoAdditions>

            <requestedDisplayResolution>high</requestedDisplayResolution>

        </iPhone>

      <extensions>

                        <extensionID>com.adobe.appPurchase</extensionID>

                        <extensionID>com.jdconley.myextensions</extensionID>

      </extensions>

    </application>

     

     
    |
    Mark as:
  • Currently Being Moderated
    Feb 24, 2012 6:54 PM   in reply to JD Conley

    You have it set to work on iPad, but auto orients is off. That will stop it from being accepted by Apple.

     

    What is the full list of splash screen images you've included? I mean, their exact names.

     
    |
    Mark as:
  • Currently Being Moderated
    Feb 24, 2012 8:12 PM   in reply to Colin Holgate

    The autoOrients=false setting was for experimentation. I was changing everything that looked like it might have an effect. Regardless of the setting for autoOrients it flashes to a distorted portrait view for a moment before calling the constructor on our Application if you have the initial aspectRatio set to landscape in the XML and start the device physically in either right or left landscape orientation.

     

    This is a universal build. I have:

     

    Default.png

    Default@2x.png

    Default-Portrait.png

    Default-Landscape.png

     

    I figured out how to work around the problem by leaving out the initial aspectRatio setting in the xml and using stage.setOrientation from code. The two iPhone png's and the Default-Portrait.png are graphically rotated right to simulate landscape mode. I manually call setOrientation to right at launch if the orientation is default or upside down. This causes the orientation change animation, but it's much less ugly than the distorted portrait view image. Further, I prevent the portrait orientations from happening through the typical means of using the StageOrientationEvent.ORIENTATION_CHANGING event and a preventDefault() call.

     

    I woud love to see a configuration for an OR'd list of allowed orientations, and have AIR deal with all this stuff.

     
    |
    Mark as:
  • Currently Being Moderated
    Feb 25, 2012 6:21 AM   in reply to JD Conley

    I get good clean launches by using autoorients, setting the aspect ratio to landscape, but only include three of those files. The one that I think messes you up is the Default-Portrait one. iOS is picking up on that, and given that you're telling it to be landscape anyway, it doesn't need the portrait one, but it does use it because physically the device may be more portrait at the time. The Default.png is needed, for iPhone and iPod Touch, and the Default@2.png is used by iPhone 4.

     
    |
    Mark as:
  • Currently Being Moderated
    Feb 25, 2012 9:52 AM   in reply to Colin Holgate

    I just tried deleting Default-Portrait.png and it had the same bad behavior as before. Are you using the latest AIR 3.1 SDK Colin? As others have mentioned, this problem does not occur in AIR 3.0. I can also assure you that the device is physically in landscape orientation and not moving, as I have a stand that holds it in landscape orientation. It also starts to launch with the correct splash image, then seems to rotate and stretch that image into a portrait view. It looks like it is taking the Default-Landscape.png and stretching it to fit in the portrait dimensions, in DEFAULT orientation. Again, this does NOT happen if I remove the default aspectRatio from the AIR config.

     

    I wish I could set this stuff in the InfoAdditions like a native app... http://help.adobe.com/en_US/air/build/WSfffb011ac560372f7e64a7f12cd2dd 1867-8000.html#WS901d38e593cd1bac6c9d409a12e26b451be-8000

     
    |
    Mark as:
  • Currently Being Moderated
    Feb 25, 2012 9:59 AM   in reply to JD Conley

    I've used various versions. If it's CS5.5 I'm using, then it would be AIR 3.1.

     

    There's one thing you mentioned that could give a clue. If you did use Default-Portrait on a landscape app, just so that someone holding it in portrait would be encouraged to turn the device, then the image would be 768x1024, and would be your landscape splash screen rotated 90 degrees clockwise. The Default-Landscape image isn't the same, it wants to be the splash screen looking the right way up, and 1024x768.

     
    |
    Mark as:
  • Currently Being Moderated
    Feb 25, 2012 11:43 AM   in reply to Colin Holgate

    Yeah, that's a good guess. But the resolutions of the images are correct.

     

    I have narrowed it down to the fact that I'm including the in app purchase native extension. I haven't tried a blank native extension, but I know the in app purchase one doesn't do anything UI related. It must have something to do with the package/init process when there is a native extension packaged with the build.

     

    Here is its ObjC source: http://code.google.com/p/in-app-purchase-air-ios/source/browse/#svn%2F branches%2Fv1%2FNative%2FiOS%2FAppPurchase

     

    And I have posted a Flash Builder 4.6 sample project here that shows how I set it up: https://github.com/jdconley/air-ios-splashdemo

     
    |
    Mark as:
  • Currently Being Moderated
    Feb 26, 2012 11:01 AM   in reply to JD Conley

    I have been having the exact same problem since I upgraded to AIR 3.1. I've been building using Flash CS5.5 and recently overlayed AIR 3.1. I am NOT using an ANE. I've gone through all the steps wackiejd has.

     

    Regards,

    John

     
    |
    Mark as:
  • Currently Being Moderated
    Feb 26, 2012 11:05 AM   in reply to John R Nyquist

    I have been having the exact same problem since I upgraded to AIR 3.1. I've been building using Flash CS5.5 and recently overlayed AIR 3.1. I am NOT using an ANE. I've gone through all the steps wackiejd has.

     

    Interesting! Can you maybe fork my little github project and see if you can get it to reproduce without the ANE? I know that'll help Adobe narrow it down. The only way I could get it to happen was to include the ANE in the iOS build...

     
    |
    Mark as:
  • Currently Being Moderated
    Feb 26, 2012 1:39 PM   in reply to JD Conley

    Send me a link and I'll look.

     
    |
    Mark as:
  • Currently Being Moderated
    Feb 27, 2012 1:37 AM   in reply to John R Nyquist

    Hi Guys ,

    This launch image rotation by 90 deg is a known issue and has been fixed for the next release . However , this issue is known only when iOS 5 sdk is used for packaging . This can be used by the following 2 methods :

    1) By using -platformsdk switch in the adt packaging command .

    2) If Flash Builder is set to use iOS 5 sdk . This can be set in Flash Buider 4.6 by following steps :

         Right-click the project

         Goto properties -> Under Flex Build Packaging side bar select Apple iOS

         In the Native Extensions tag you have an entry for a Apple iOS SDK where you can set the path to the iOS 5 SDK

     

    Are you guys using iOS 5 sdk while packaging by any of the above 2 methods??

     
    |
    Mark as:
  • Currently Being Moderated
    Feb 27, 2012 1:42 AM   in reply to Abhayjit Singh

    If you investigate AIR sdk - you will found that no any sdk used. Just files from it

     
    |
    Mark as:
  • Currently Being Moderated
    Feb 27, 2012 7:17 AM   in reply to Abhayjit Singh

    2) If Flash Builder is set to use iOS 5 sdk . This can be set in Flash Buider 4.6 by following steps :

         Right-click the project

         Goto properties -> Under Flex Build Packaging side bar select Apple iOS

         In the Native Extensions tag you have an entry for a Apple iOS SDK where you can set the path to the iOS 5 SDK

     

    Are you guys using iOS 5 sdk while packaging by any of the above 2 methods??

     

    Yes, I'm doing this. Is the fix in one of the beta releases?

     
    |
    Mark as:
  • Currently Being Moderated
    Feb 27, 2012 8:44 AM   in reply to JD Conley

    for me setting aspectRatio to auto and attaching portrait and landscape default image works just fine.

    I'm using Flash Professional 5.5, to set aspectRatio to auto in xml you have to remove <aspectRatio>portrait</aspectRatio> or <aspectRatio>landscape</aspectRatio> node from <initialWindow/>.

    The other thing is if you want your splash screen to be landscape (like I do) you have to prepare Default-Portrait.png so it's the same image that Default-Landscape.png but rotated 90 deg CCW.

    works fine for me.

    I hope it helps you

     
    |
    Mark as:
  • Currently Being Moderated
    Feb 29, 2012 10:16 PM   in reply to JD Conley

    Hi JD , the fix is not there in beta release . You will have to wait for the next release .

     
    |
    Mark as:
  • Currently Being Moderated
    Mar 1, 2012 12:48 AM   in reply to Abhayjit Singh

    I have the same issue.  An app we've been developing for almost a year now has been fine in all previous versions of ADT, and suddenly with 3.1 we get the rotated splash screen issue.  We only use a single landscape default image.  No ANE files included.  Using Flash Pro 5 to compile the swf, but not using the -platformsdk switch for ADT.

     

    @Abhayit Any idea when the next release is due out?

     
    |
    Mark as:
  • Currently Being Moderated
    Mar 1, 2012 12:55 AM   in reply to Pea

    Hi Pea ,

    please share your app.xml . We will look into it . 

     
    |
    Mark as:
  • Currently Being Moderated
    Mar 1, 2012 7:03 AM   in reply to michal_tsign

    This did not fix it for me.

     
    |
    Mark as:
  • Currently Being Moderated
    Mar 1, 2012 11:27 AM   in reply to Applauz78

    I use FB4.6 with AIR3.1 and I haven't ever experienced this issue. I also was exporting from Flash CS5.5 (before buying FB just to make using ANEs easier) and never experienced this issue.

     

    I've also never had adt compile something entirely correctly for me, which is why I just relegate to FB.

     

    My XML looks as follows, which is very similar, and launches landscape perfectly (AS-only project):

     

    <?xml version="1.0" encoding="utf-8" standalone="no"?>

    <application xmlns="http://ns.adobe.com/air/application/3.1">

              <id>com.somecompany.SomeApp</id> -->

              <filename>SomeApp</filename>

              <name>

                        <text xml:lang="en">Some App</text>

              </name>

              <versionNumber>1.0.0</versionNumber>

              <description>

                        <text xml:lang="en">My apps description.</text>

              </description>                            

              <copyright>Copyright 2012, ME</copyright>

              <initialWindow>

                        <content>[This value will be overwritten by Flash Builder in the output app.xml]</content>

                  <systemChrome>standard</systemChrome>

                  <transparent>false</transparent>

                  <visible>true</visible>

                  <fullScreen>true</fullScreen>

                  <aspectRatio>landscape</aspectRatio>

                  <renderMode>gpu</renderMode>

                  <autoOrients>true</autoOrients>

        </initialWindow>

      <icon>

        <image29x29>AppIconsForPublish/t29.png</image29x29>

        <image57x57>AppIconsForPublish/t57.png</image57x57>

        <image114x114>AppIconsForPublish/t114.png</image114x114>

        <image512x512>AppIconsForPublish/t512.png</image512x512>

        <image48x48>AppIconsForPublish/t48.png</image48x48>

        <image72x72>AppIconsForPublish/t72.png</image72x72>

      </icon>

              <customUpdateUI>false</customUpdateUI>

              <allowBrowserInvocation>false</allowBrowserInvocation>

              <iPhone>

                <InfoAdditions>

                  <![CDATA[<key>UIFileSharingEnabled</key><true/><key>UIDeviceFamily</key><array><string>2</string></array>]]>

                </InfoAdditions>

                <requestedDisplayResolution>standard</requestedDisplayResolution>

              </iPhone>

              <extensions>

            <extensionID>ie.jampot.MobileBackup</extensionID>

        </extensions>

    </application>

     

    All I included was Default-Landscape.png and Default-LandscapeRight.png.

     

    I also included the same image immediately in my class (from a library element) to the screen.

     
    |
    Mark as:
  • Currently Being Moderated
    Mar 1, 2012 11:51 AM   in reply to sinious

    Thanks Abhayjit, this is my XML:

     

    <?xml version="1.0" encoding="utf-8" ?> 
    <application xmlns="http://ns.adobe.com/air/application/3.1">
              <id>[App ID]</id> 
              <versionNumber>1.2.5</versionNumber>
              <filename>[App filename]</filename> 
              <name><text xml:lang="en">[App name]</text></name> 
              <description><text xml:lang="en">[App description]</text></description> 
              <copyright>Pixelthis Limited</copyright> 
              <initialWindow> 
                        <title>[App name]</title> 
                        <content>[App swf]</content> 
                        <autoOrients>false</autoOrients> 
                        <renderMode>gpu</renderMode>  
                        <fullScreen>true</fullScreen>  
                        <aspectRatio>landscape</aspectRatio>  
              </initialWindow>
              <supportedProfiles>mobileDevice desktop</supportedProfiles>
              <iPhone> 
                        <InfoAdditions><![CDATA[  
                                  <key>UIStatusBarStyle</key>  
                                  <string>UIStatusBarStyleBlackOpaque</string>  
                                  <key>UIRequiresPersistentWiFi</key>  
                                  <false/>
                                  <key>UIApplicationExitsOnSuspend</key> 
                                  <true/>
                                  <key>UIPrerenderedIcon</key> 
                                  <false/>
    <key>UIDeviceFamily</key>
                                  <array>
                                      <string>2</string>
                                  </array>
                        ]]></InfoAdditions>  
                        <requestedDisplayResolution>standard</requestedDisplayResolution>
              </iPhone>
              <icon>
                        <image29x29>icons/icon29x29.png</image29x29>
    <image48x48>icons/icon48x48.png</image48x48>
    <image57x57>icons/icon57x57.png</image57x57>
    <image72x72>icons/icon72x72.png</image72x72>
    <image114x114>icons/icon114x114.png</image114x114>
    <image512x512>icons/icon512x512.png</image512x512>
              </icon>
    </application>
    

     

    And this is my ADT command:

     

    adt -package -target ipa-test -storetype pkcs12 -keystore "[path/to/keystore.p12]" -storepass [password] -provisioning-profile "[path/to/.mobileprovision]" app_name.ipa app_name-app.xml app_name.swf icons Default-Landscape~ipad.png 
    
     
    |
    Mark as:
  • Currently Being Moderated
    Mar 1, 2012 12:35 PM   in reply to Applauz78

    Default-Landscape~ipad.png? What's with the tilde ~ipad?

     
    |
    Mark as:
  • Currently Being Moderated
    Mar 1, 2012 12:42 PM   in reply to Pea

    I read somewhere that the ~ versions are sometimes used as PLIST key names, and as sinious says would not be the file names. Just take away the ~ipad part of the name

     

    Also, as it stands your app would be rejected, for not supporting the other landscape.

     
    |
    Mark as:
  • Currently Being Moderated
    Mar 1, 2012 12:49 PM   in reply to Applauz78

    It is mandatory to support DefaultRight landscape. There's a quick snippit to allow you to rotate the device to Landscape or Upside Down Landscape. Without it you'll get punted.

     

    e.g.

     

    import flash.display.StageAlign;

    import flash.display.StageOrientation;

    import flash.display.StageScaleMode;

     

    stage.align = StageAlign.TOP_LEFT;

    stage.scaleMode = StageScaleMode.NO_SCALE;

     

    startOrientation = stage.orientation;

    if (startOrientation == StageOrientation.DEFAULT || startOrientation == StageOrientation.UPSIDE_DOWN)

    {

              stage.setOrientation(StageOrientation.ROTATED_RIGHT);

    }

    else

    {

              stage.setOrientation(startOrientation);

    }

    stage.addEventListener(StageOrientationEvent.ORIENTATION_CHANGING, _orientationChangeHandler);

     

     

     

     

    function _orientationChangeHandler(e:StageOrientationEvent):void

    {

              if (e.afterOrientation == StageOrientation.DEFAULT || e.afterOrientation ==  StageOrientation.UPSIDE_DOWN)

              {

                        e.preventDefault();

              }

    }

     
    |
    Mark as:
  • Currently Being Moderated
    Mar 1, 2012 12:51 PM   in reply to sinious

    So this might be why it worked pre 3.1 but not with 3.1?

     

    And how do you add a Default screen for both ipad and iPhone?  Is there a different naming convention?

     
    |
    Mark as:
  • Currently Being Moderated
    Mar 1, 2012 12:52 PM   in reply to Applauz78

    Very strange, I can't edit my post..

     

    startOrientation = stage.orientation;

     

    should be...

     

    var startOrientation:String = stage.orientation;

     

    (just giving the frame script version of my class version)

     
    |
    Mark as:
1 2 Previous Next
Actions

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points