Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ADT works with ipa-test-interpreter but not ipa-test

I could use some help getting my #AS3 / #AIR application running on #iOS !

Right now I have a .SWF (v11) that I'm converting to an .IPA using Adobe AIR (v3.7) on Windows (7).

If I do the conversion with the -target of ipa-test-interpreter it works great.

If I do the conversion with ipa-test, ipa-debug, ipa-ad-hoc, or ipa-appstore, the application seems to compile fine but upon execution of the app on my iPad it just shows a black screen.

Connecting my iPad to a desktop and monitoring console output, I see not crash or error messages generated; the app appears to behave fine internally, it's just lost all external output.

This means I can test and develop but I won't ever actually be able to deploy to the app-store. Anyone else run into this?

Googling around I've run into other people encountering this problem, but no solutions yet. One thing I tried was removing all native extensions, and I also tried removing the -C compiler directive. No luck on either.

To be clear, the app runs totally fine on Mac, PC, Android, Browser, and on iOS in interpreter mode; it's just native-compilation on iOS that's broken. I've heard rumours that ipa-test and ipa-interpreter have different memory allocation routines, but I don't know enough about the low-end here to figure this out.

The remote debugger (in FlashDevelop) doesn't seem to connect either. I think it's failing before the runtime fires fully, somehow? I'm also watching the console output using the iphone-configuration-utility and there isn't anything abnormal showing up.

Temporary file link with sample project and instructions: https://dl.dropboxusercontent.com/u/1348446/test.zip

like image 575
Andy Moore Avatar asked May 09 '13 22:05

Andy Moore


1 Answers

Figured it out. Rundown:

The ADT command line has a -C flag to change the current working directory on the command line, which allows you to keep your project better organized and keep the command line a bit more sane. -C can be called as many times as you want when importing assets, and I used it several times. IDEs like FlashDevelop also use -C in the AIR template files so this is sorta standard behaviour. As a quick example of asset inclusion:

ADT.exe [blah blah] assets/icons/icon1.png assets/icons/icon2.png

is the same as

ADT.exe [blah blah] -C assets/icons icon1.png icon2.png

(and, with wildcard use) is the same as

ADT.exe [blah blah] -C assets/icons .

As I have different compiling instruction sets for iOS, android, steam, etc., I had adt switch directories with a variable to the current config and execute from there.

This all works fine and as-documented in ipa-test-interpreter mode. When in native-code mode (ipa-test), however, including the main executable .SWF after a -C command [somehow for some reason] messes up the internal pathing; the file ends up being included but ends up being all "file not found" internally when executed, hence the blank screen and no code executing.

So the fix is simply to include the .swf from the current directory, before any calls to -C. As a quick example of my workaround that just tested a-okay:

copy /bin/flash/game.swf ./
adt [stuff] game.swf -c assets/icons .
del game.swf

I've gotten in touch with Adobe about this and hopefully they'll fix -C so it's functionality is the same for both compile targets in the future.

like image 167
Andy Moore Avatar answered Oct 03 '22 06:10

Andy Moore