Skip to main content
June 3, 2013
Question

iOS app starts with black screen when compiled via ADT (Flex 4.6, AIR3.7)

  • June 3, 2013
  • 4 replies
  • 3969 views

I was using Flex 4.6 with AIR 3.1 in Flash Builder 4.6 on Windows 7. I used two build methods: 1) "Export Release Build" in Flash Builder during development and 2) the ADT toolchain on my build server.

For the ADT method I would create AIR intermediate files using:

"C:\Program Files (x86)\Adobe\Adobe Flash Builder 4.6\FlashBuilderC.exe" --launcher.suppressErrors -noSplash -application org.eclipse.ant.core.antRunner -data [PATH_TO_SOURCE] -file [PATH_TO_BUILD_XML] [PROJECT_NAME]

Where my build.xml looks like:

<?xml version="1.0"?>
<project default="main">
    <target name="main">
        <fb.exportReleaseBuild project="[PROJECT_NAME]" basefilename="[BASE_FILE_NAME]" verbose="true" destdir="bin-release" />
    </target>
</project>

From these intermediate AIR files I would create my APK and IPA files using ADT like so (shown for iOS):

echo [CERTIFICATE_PASSWORD]|"C:\Program Files (x86)\Adobe\Adobe Flash Builder 4.6\sdks\4.6.0\bin\adt" -package -target ipa-test -provisioning-profile [PATH_TO_MOBILE_PROVISIONING_FILE] -storetype PKCS12 -keystore [PATH_TO_DEV_CERTIFICATE] [OUTPUT_PATH] [PATH_TO_IOS_AIRI]

This procedure produced working iOS and Android apps as well.

I decided to upgrade AIR to version 3.7. I used the overlay proceedure described here (http://helpx.adobe.com/x-productkb/multi/how-overlay-air-sdk-flex-sdk.html). I also updated the namespace in my project to reflect the new AIR version. Using "Export Release Build" in Flash Builder produces working copies of both the iOS and Android apps. Furthermore, the secondary method (used on my build server), produces both APK and IPA files without error. The APK works just fine but the IPA does not. When running the app on an Apple device, it starts up with a black screen and stays this way.

To summarize:

  • Flex 4.6, AIR 3.1: "Export Release Build" and ADT tool chain produce working APK and IPA files.
  • Flex 4.6, AIR 3.7 using overlay procedure: "Export Release Build" produces working APK and IPA files, ADT tool chain produces working APK file but IPA file loads black screen on Apple devices.

More notes:

I had made a back up of the "4.6.0" directory that holds the Flex and AIR SDK files. If I replace the overlayed Flex 4.6.0 SDK directory with the original (which contains AIR 3.1) and revert the namespace back to 3.1 in my project, everything goes back to normal and I get working apps via both methods described above.

Edit: I also should note that I've tried many other combinations of Flex and AIR (Flex 4.9.1 from Apache and AIR 3.5/3.6), which all produce the same issue. It seems that the overlay procedure breaks something for ADT with iOS specifically...

Edit 2: I also noticed that the IPA files output by methods 1 and 2 are slightly different. Opening these with 7-Zip I see that most of the files are the same, but some differ slightly in size (this was due to 'ipa-test' vs 'ipa-ad-hoc'). The odd thing is that in the IPA file that does not work (produced via the ADT method), the SWF file is named "swf3465180827438224920.tmp" while the SWF in the IPA that was created using "Export Release Build is named "[PROJECT_NAME].swf". It almost appears as though ADT fails to rename the temporary SWF file. I also realized that the "Export Release Build" method likely used '-target ipa-ad-hoc', so I tried this in the ADT method with the same result.

Any thoughts?

This topic has been closed for replies.

4 replies

Participant
January 14, 2015

I have the same problem.

My apps from last year are not running on iOS Device

After building the .ipa with "Export Release Build" and installation on iOS Device the App starts without any errors but only with an black screen.

I´m using FB 4.6 and 4.7 with AIR 3.1.

It is not possible to build my apps which already runs on iOS Devices, and it is not possible to run new dummy Apps.

My iOS devices runs with iOS 8.1.2.

What to do????

Adobe Employee
January 7, 2015

Hi,

We are looking at this as it is reproduced at our end.

The Bug Number for this issue is 3574268. Kindly use it for the future communications.

Roshan

Air Mobile

Participating Frequently
January 8, 2015

I have asked about this problem before.could you please check my code with below link?.I just want to determine that my command is correct or not.

FYI: I have tried with flex 4.13 and same thing happens.weird thing is that the splash screen shows without a problem and after that nothing happens.

iOS adhoc displays black screen after launch

Participating Frequently
January 7, 2015

same thing happens here.

I use AirSDK 15 with Flex 4.6.iOS 8.0

Ipa adhoc built with flash builder works fine on the device but it shows black screen after splash screen after compile using ant.

don't know whether it is a problem with my commands.anyway,I have spent days to solve this problem.totally frustrated

Anki_AG_
Adobe Employee
Adobe Employee
January 7, 2015

Thanks for reporting the issue. We are investigating the issue at our end and will get back to you shortly.

Thanks,

Adobe Air Team

Adobe Employee
June 5, 2013

Can you please share the link from where you had picked the AIR SDK and a sample application. If you'd like to keep this private, feel free to email the attachment to me directly(nimitja@adobedotcom).This will help us investigate the issue.

Also, I would recommend you try(if not using) the AIR 3.8.x beta http://labs.adobe.com/downloads/air.html , to see if that makes any difference.

Thanks for reporting,

Nimit

June 5, 2013

Hello Nimit,

Thank you for your response. I have tried AIR 3.8 Beta and this did not correct the problem. I downloaded the AIR 3.7 SDK from http://airdownload.adobe.com/air/win/download/latest/AdobeAIRSDK.zip . I have also tried with the new compiler as well, with the same result.

To keep things simple, I've created a very lightweight example with which I see the issue. I've also been able to remove the Flash Builder step and reproduce the problem with mxmlc and adt only. Since the files are simple, I will just post them here.

TestApp-app.xml


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

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

    <id>com.company.testapp</id>

    <filename>TestApp</filename>

    <versionNumber>1.0.0</versionNumber>

    <initialWindow>

        <content>TestApp.swf</content>

        <autoOrients>false</autoOrients>

        <fullScreen>true</fullScreen>

        <visible>true</visible>

        <softKeyboardBehavior>none</softKeyboardBehavior>

    </initialWindow>

    <android>

        <colorDepth>16bit</colorDepth>

        <manifestAdditions><![CDATA[

            <manifest android:installLocation="auto">

                <uses-permission android:name="android.permission.INTERNET"/>

            </manifest>

        ]]></manifestAdditions>

    </android>

    <iPhone>

        <InfoAdditions><![CDATA[

            <key>UIDeviceFamily</key>

            <array>

                <string>1</string>

                <string>2</string>

            </array>

        ]]></InfoAdditions>

        <requestedDisplayResolution>high</requestedDisplayResolution>

    </iPhone>

</application>

TestApp.mxml

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

<s:ViewNavigatorApplication xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex/spark" firstView="TestView" applicationDPI="160">

    <fx:Declarations>

        <!-- Place non-visual elements (e.g., services, value objects) here -->

    </fx:Declarations>

</s:ViewNavigatorApplication>

TestView.mxml


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

<s:View xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex/spark" title="Test App" >

    <s:VGroup width="100%" height="100%" verticalAlign="middle" horizontalAlign="center" >

        <s:Label text="Hello World!" />

    </s:VGroup>

</s:View>

Create the above files in a single directory. Run the following to get a working IPA (method 1):

> mxmlc +configname=airmobile TestApp.mxml

> adt -package -target ipa-test -provisioning-profile [PROVISIONING_FILE] -storetype pkcs12 -keystore [CERTIFICATE] TestApp.ipa TestApp-app.xml TestApp.swf

To reproduce the problem, run the following (method 2):

> mxmlc +configname=airmobile TestApp.mxml

> adt -prepare TestApp.airi TestApp-app.xml TestApp.swf

> adt -package -target ipa-test -provisioning-profile [PROVISIONING_FILE] -storetype pkcs12 -keystore [CERTIFICATE] TestApp.ipa TestApp.airi

If you unpack the working IPA (from method 1) you will see the file "TestApp.ipa\Payload\TestApp.app\TestApp.swf". However, if you likewise inspect the IPA created via the AIR intermediate method (method 2), you will see the file "TestApp.ipa\Payload\TestApp.app\swf1970057761096800694.tmp" and there will be no "TestApp.swf". In both IPA files, if we inspect "TestApp.ipa\Payload\TestApp.app\Info.plist", we see the snippet:

...

        <key>CTInitialWindowTitle</key>

        <string>TestApp</string>

        <key>CTInitialWindowContent</key>

        <string>TestApp.swf</string>

        <key>CTMaxSWFMajorVersion</key>

        <string>20</string>

        <key>CFBundleSupportedPlatforms</key>

...

So I suspect "TestApp.ipa\Payload\TestApp.app\swf1970057761096800694.tmp" is incorrectly named, cannot be found at runtime and thus displays a black screen.

This problem is observed when using AIR 3.7. It is not observed when using AIR 3.1.

Adobe Employee
June 6, 2013

Could you please open a new bug report on this over at bugbase.adobe.com? Once the bug has been added would you mind posting back with the URL so that others affected can add their votes and comments?

Regards,

Nimit