Skip to main content
Inspiring
June 4, 2015
Question

Hello World app for iPad doesn't run when using Standard packaging.

  • June 4, 2015
  • 2 replies
  • 956 views

I'm having some issues getting a basic R&D app to run on an iPad.  When I use Fast packaging, the app will run fine (possibly slowly), but when I use Standard packaging, I just get a blank white screen that doesn't do anything.

I have reduced it to two different Hello World apps that I can reproduce this with:

1:

package

{

    import flash.display.Sprite;

    import flash.events.Event;

    import flash.text.TextField;

  

    public final class HelloWorld1 extends Sprite

    {

        private var m_lbl:TextField = new TextField();

      

        public function HelloWorld1()

        {

            stage ? init() : addEventListener(Event.ADDED_TO_STAGE, init);

            function init(pEvent:Event = null):void {

                removeEventListener(Event.ADDED_TO_STAGE, init);

                addChild(m_lbl);

                m_lbl.text = "Hello, World!";

            }

        }

    }

}

2:

package

{

    import flash.display.Sprite;

    import flash.events.Event;

  

    public final class HelloWorld2 extends Sprite

    {

        public function HelloWorld2()

        {

            stage ? init() : addEventListener(Event.ADDED_TO_STAGE, init);

            function init(pEvent:Event = null):void {

                removeEventListener(Event.ADDED_TO_STAGE, init);

              

                graphics.beginFill(0x000000);

                graphics.drawRect(0, 0, 320, 240);

                graphics.endFill();

            }

        }

    }

}

When I run these apps on the company's iPad using Fast packaging, I get either a simple label or a black rectangle to show up on the screen, depending on which one.  But when I run either using Standard packaging - which is supposed to not have any differences at all, aside from speed - the screen just comes up in plain white, and nothing happens.

What would there be to check?  Thanks!

UPDATE:

This is in the device's crash logs for the app:

Exception Type:  EXC_RESOURCE

Exception Subtype: WAKEUPS

Exception Message: (Limit 150/sec) Observed 468/sec over 300 secs

Apparently the Standard packaging compilation is inserting an exceptionally high number of thread sleep/wakeup calls, causing the thread to crash in iOS.

This topic has been closed for replies.

2 replies

User Unknow
Legend
June 5, 2015

stage ? init() : addEventListener(Event.ADDED_TO_STAGE, init);

            function init(pEvent:Event = null):void {

Never and never do like that!

Adobe AIR have always stage available in your Document class so checking if stage is already there - it's too much. Also don't use any methods/functions inside another methods/functions like you done:

public function myFunc(){

  function myAnotherFunc..

}

AS3 it's not an JS! A lot of bugs can be skipped if you will use right model of development!

piyushb89979246
Adobe Employee
Adobe Employee
June 5, 2015

Hi,

I have checked your Project with AIR SDK 18.0 and IOS 8.1 on Flash Builder 4.7. It is working fine at my end.

Could you please share your AIR SDK version?

Is your issue is device specific?

Thanks

Adobe AIR Team

Inspiring
June 9, 2015

Hi, piyushb89979246,

Thanks for the reply.  I'm trying to upgrade my SDK, but I'm running into two issues.  One of them is that when I got 18.0 from http://www.adobe.com/devnet/air/air-sdk-download.html (the Windows version) and installed it according to the directions at Update the AIR SDK for ActionScript Projects | Flash Builder 4.7, I was no longer able to see my iPad on the list of connected devices when I tried to run a program.  When I took the version back down to 3.4, I was able to see the iPad again, but when I put it back on 18.0, I lost it again.  Another problem is that, though I've also tried downloading 17.0 or the SDK-only version for 18.0, the company anti-virus or whatever seems pretty sure there is a Trojan attached called "Sality.AT_7" and keeps blocking me.

Do you know what might be happening?  Thank you.

piyushb89979246
Adobe Employee
Adobe Employee
June 10, 2015

Hi Howitzer21‌,

Issue1: Please make Sure that if you are using AIR SDK 18, then you should use latest version of iTunes for Windows i.e 12.1.2 for Windows 64 bit

Issue2: I have downloaded latest SDK 18.0.0.143  on Windows 8.1 from this link Download Adobe AIR SDK for Windows‌ and i am not facing any issue's. We have no such file Sality.AT_7 in Windows AIR SDK. It could be issue with your local system.

Thanks

Piyush