Aug 15, 2013 #Actionscript#Mobile#Linux#AIR
While Linux isn't an officilaly supported development platform for the Adobe AIR SDK, mobile development is possible from Linux targetting both Android and iOS. I use Ubuntu 12.04, Wine 1.4 (though 1.5 should work fine), AIR SDK 3.6 (though again, later versions should work fine), and Flex SDK 4.6. Here's a quick list of the commands I use for this:
$FLEX_SDK/bin/mxmlc Main.as -static-link-runtime-shared-libraries
Compile with ASC2 compiler (required for inlining, $AIR_HOME/bin/mxmlc Main.as -compress=false -static-link-runtime-shared-libraries
Simulate (ADL) via Wine:
wine $AIR_HOME/bin/adl.exe -screensize iPad -profile extendedMobileDevice app.xml
Note that to successfully simulate some networking code, I had to enable it in wine via:
winetricks.sh wininet
You can optionally package for Android natively, because the Win/Mac restriction is for the AOT compiler (iOS):
java -jar $AIR_HOME/lib/adt.jar -package -target apk-captive-runtime -storetype pkcs12 -keystore example.p12 -storepass example Main.apk app.xml Main.swf assets
But you can package for iOS or Android via Wine:
wine java -jar 'Z:\opt\air_sdk_3.6\lib\adt.jar' -package -target apk-captive-runtime -storetype pkcs12 -keystore example.p12 -storepass *** Main.apk app.xml Main.swf assets
wine java -jar 'Z:\opt\air_sdk_3.6\lib\adt.jar' -package -target ipa-test -storetype pkcs12 -storepass *** -keystore certificates.p12 -provisioning-profile profiles.mobileprovision Main.ipa app.xml Main.swf assets
You can install directly on Android via USB:
$ANDROID_SDK/platform-tools/adb install -r Main.apk
adt.bat -installApp -platform ios -package Main.ipa (doesn't work from linux)
Update 2013-08-28: It turns out you can install apps from Linux onto USB-attached iOS devices using ideviceinstaller (it's available in the Ubuntu apt-get repos). Then I simply install my app like so:
ideviceinstaller -i Main.ipa
You can also upload to testflight via CURL for iOS installation:
curl http://testflightapp.com/api/builds.json -F file=@Main.ipa -F api_token=*** -F team_token=***
Let me know in the comments if these work for you, if you'd like clarification, and if you have any additional tips.
comments powered by Disqus