There is a lot of hype around the huge performance jump of AIR 2.7 towards AIR 2.5 when publishing for iOS and of course everybody wants to test it. Most of you have read how to overlay the inbuilt Flash CS 5.5 (AIR SDK 2.6) to AIR 2.7 (http://kb2.adobe.com/cps/908/cpsid_90810.html) but what should be done when you are still using Flash CS 5 with the old IPA compiler? Here is the solution to discover the full power of AIR 2.7 on your iPad…
Download the AIR 2.7 SDK
The new AIR 2.7 SDK is available here: http://www.adobe.com/products/air/sdk/
Decompress the whole directory in a directory (e.g. C:\AdobeAIRSDK_27)
Compile your SWF with Adobe Flash CS 5 (or Flash CS 5.5)
Open your .fla file. Now press CTRL + Enter to Publish and check the SWF you have created.
Compile with ADT
In Flash CS5 you had the IPA export box; that was before the Apple vs. Adobe problems concerning Flash on the iPhone. But since approximately last semester 2010, Adobe have followed the way of compiling with the ADT (AiR Developer Tool) method in order to package your AIR app as a native installer e.g .exe installer file on Windows, .ipa on iOS, or .apk on Android. It means that the Flash CS 5 IPA Exporter still works, but we want full AIR 2.7 speed don’t we? That’s why we need to use the ADT !
Method 1: With the command-line
To compile with the command line with adt you will need following lines (if you are using adt on a 64Bit machine, note that you need to add the path to your Java JRE.
Here is an easy to understand example of compiling with the target ipa-test ()
"C:\Program Files (x86)\Java\jre6\bin\java" -jar "C:\AdobeAIRSDK_27\lib\adt.jar" -package -target ipa-test -storetype pkcs12 -keystore "C:\iPhoneCerts\iphone_dev.p12" -storepass myPassWord -provisioning-profile "C:\ iPhoneCerts \iPad_Test.mobileprovision" MyNiceCool.ipa MyCoolApp.xml MyCoolApp.swf icons Default-Landscape~ipad.png "MyCoolFileToAdd.xml" "aDirectoryToAdd"
Read more about the adt command lines:
http://help.adobe.com/fr_FR/air/build/WS901d38e593cd1bac35eb7b4e12cddc5fbbb-8000.html
Method 2: With ADT-Helper by Peter Vullings (pixelthismobile.com)
If you hate to type complex command-lines and prefer using a GUI you will be very happy to discover this small AIR Windows application: ADT Helper developed by Peter Vullings and freely available on his webpage (http://www.pixelthismobile.com/blog/3/04/2011/adt-helper-tool).
Thanks a lot to Peter Vullings for providing us this nice application!
The ADT Helper application will do the same job than the Flash CS 5.5 iOS export tool! You only need to specify the path to the AIR SDK and press . The application is pretty nice because it will also copy all necessary files to a directory (/ios) and will create a batch file called build.bat containing all the necessary parameters to generate your .ipa file.
Note: per default ADT Helper will write a *.-app.xml for 2.6 we need to change it :
Change in your MyCoolApp-app.xml 2.6 into 2.7
<application xmlns="http://ns.adobe.com/air/application/2.7">
Deploy to iOS
That’s the easiest step 😉 Press the “Deploy to iOS” button of ADT-helper and you will see a MS-DOS command box that will in fact launch a generated build.bat batch file.
After a few minutes (yes the conversion from the swf to native code, is still very slow, but come one 😉 ! ) your ipa file is generated!
Useful resources:
http://www.flashrealtime.com/compiling-big-air-swf-to-ios/
http://www.pixelthismobile.com/blog/3/04/2011/adt-helper-tool
http://help.adobe.com/fr_FR/air/build/WS901d38e593cd1bac35eb7b4e12cddc5fbbb-8000.html
http://help.adobe.com/en_US/air/build/WS901d38e593cd1bac1e63e3d128fc240122-8000.html