***Update: Use package.blackberry OR install.blackberry when running the ANT task, using both will overwrite the BAR file and remove signing. Verify your BAR is signed by renaming it from app.bar to app.zip, extract and ensure you have META-INF/AUTHOR.EC and META-INF/RDK.EC included in the zip.***

Create your market ready AIR apps for iOS, Android and the BlackBerry PlayBook in a single click using the same code. This ANT task compiles, signs and pushes out to attached devices (iOS requires dragging into iTunes). All of the signed apps created with this ANT task can be published to the market.

Overview:
The AIR 2.6 SDK is great but doesn’t have full Flash Builder support yet. This ANT task can be used in Flash Builder, Flash Develop, FDT or even the command line. Using Flash Develop, you can create apps for all devices without paying for expensive software!

Pre-requisites:
You will need to install Flash Builder Burrito, the BlackBerry PlayBook SDK, the AIR 2.6 SDK and acquire signing keys for all three devices. If using Flash Develop, you will need to follow some additional steps for ANT integration. You’ll also want to download the base project from Google Code: http://code.google.com/p/air-mobile-tools/

Video Tutorial:

Wiki:
The wiki on Google code contains more information on getting started with this base project: http://code.google.com/p/air-mobile-tools/wiki/BaseMobileActionScriptProject

ANT Task:
[XML]




















































todir="${build.dir}/blackberry" preservelastmodified="true" />





























































































































[/XML]

[AS]
flex.path = C:/Program Files (x86)/Adobe/Flash Builder Burrito/Adobe Flash Builder Burrito/sdks
flex.sdkVersion= 4.5.0_air
flex.sdkPath= ${flex.path}/${flex.sdkVersion}
FLEX_HOME= ${flex.sdkPath}
BB_HOME = ${flex.path}/blackberry-tablet-sdk-0.9.4
contentText = [This value will be overwritten by Flash Builder in the output app.xml]

ADB = C:/Users/Chris/Desktop/Froyo/android-sdk-windows/platform-tools/adb.exe
ADT = ${flex.sdkPath}/bin/adt.bat
adt.path = ${flex.sdkPath}/bin/
IPHONE_PACKAGER = adt

BBDeploy = ${flex.path}/blackberry-tablet-sdk-0.9.4/bin/blackberry-deploy.bat
BBPackager = ${flex.path}/blackberry-tablet-sdk-0.9.4/bin/blackberry-airpackager.bat
BBSigner = ${flex.path}/blackberry-tablet-sdk-0.9.4/bin/blackberry-signer.bat
bb.ip = [PLAYBOOK_IP]
bb.password = [YOUR_PASSWORD]

## Directories
build.dir = bin-release
dev.dir = ${basedir}/src
cert.dir = ${basedir}/certs
app.name = BaseMobileActionScriptProject

## mxml or as
app.type = as

## Apple cert info: ipa-test | ipa-debug | ipa-app-store | ipa-ad-hoc
apple.target = ipa-ad-hoc
apple.cert = [APPLE_CERT_NAME].p12
apple.cert.password = [CERT_PASSWORD]
apple.provision = [PROVISION_NAME].mobileprovision
apple.descriptor = ${dev.dir}/${app.name}Apple-app.xml

## Android cert info
cert = [ANDROID_CERT_NAME].p12
cert.password = [YOUR_PASSWORD]

## PlayBook cert info
bb.cert = [BB_CERT_NAME].p12
bb.cert.password = [YOUR_PASSWORD]
bb.store.password = [YOUR_STORE_PASSWORD]
bb.descriptor = ${dev.dir}/${app.name}BlackBerry-app.xml

## General
swfFile=${build.dir}/${app.name}.swf
projectFile=${dev.dir}/${app.name}.${app.type}
[/AS]

Resources:
http://www.terrenceryan.com/blog/post.cfm/using-ant-to-package-the-same-air-app-to-multiple-devices
http://technophi.com/2011/03/08/using-ant-to-compile-a-flex-mobile-project-for-ios/
http://www.adobe.com/devnet/flex/articles/flex_ant_pt1.html
http://help.adobe.com/en_US/air/build/WSfffb011ac560372f-5d0f4f25128cc9cd0cb-7ffb.html

Tags: , , ,