Skip to content

Instantly share code, notes, and snippets.

@cecilemuller
Created May 29, 2012 00:23
Show Gist options
  • Save cecilemuller/2821841 to your computer and use it in GitHub Desktop.
Save cecilemuller/2821841 to your computer and use it in GitHub Desktop.
Build and start in XCode Simulator an Adobe AIR 3.3 beta 3 application for iOS 5.1 using shell commandline
#!/bin/bash
#
# This is a Mac OSX shell script, you can simply double-click to start it.
#
# This is where you downloaded the AIR SDK from http://labs.adobe.com/downloads/air3-3.html
AIR_SDK="/Applications/Adobe/AIR SDK/AIR SDK 3.3b3"
# iOS 5.0
#IOS_SDK="/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator5.0.sdk"
# iOS 5.1
IOS_SDK="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator5.1.sdk"
# If you don't know this value, look in your application.xml for the tag <id>
APPID="com.wildpeaks.example"
# Signing certificate and its password.
# See http://help.adobe.com/en_US/air/build/WS5b3ccc516d4fbf351e63e3d118666ade46-7ff0.html#WSfffb011ac560372f284e44b012cd1e700c0-8000
KEYSTORE="bin/certificates/developer.p12"
PASSWORD="hello"
# Sets current directory to be where the script is located (to act like .bat on Windows)
cd "$(dirname "$0")"
startTime=`eval date +%s`
echo "-----------------------------------------------"
echo "Building the package..."
rm -f application.ipa
"$AIR_SDK/bin/adt" -package -target "ipa-debug-interpreter-simulator" -connect -storetype pkcs12 -keystore "$KEYSTORE" -storepass "$PASSWORD" "application.ipa" "application.xml" "bin/application.swf" "bin/icons" "bin/loading/Default.png"
endTime=`eval date +%s`
let PTIME=($endTime - $startTime)
echo "Built in $PTIME seconds."
echo "-----------------------------------------------"
echo "Now sending to the simulator..."
"$AIR_SDK/bin/adt" -uninstallApp -platform "ios" -platformsdk "$IOS_SDK" -device "ios-simulator" -appid "$APPID"
"$AIR_SDK/bin/adt" -installApp -platform "ios" -platformsdk "$IOS_SDK" -device "ios-simulator" -package "application.ipa"
"$AIR_SDK/bin/adt" -launchApp -platform "ios" -platformsdk "$IOS_SDK" -device "ios-simulator" -appid "$APPID"
@cecilemuller
Copy link
Author

Someone made a nice ANT script based on this, I'm glad it was useful :-)

@adrianmiranda
Copy link

Nice Job, congrats. I'm trying make a AS global compiler too and some things can be useful for you too:
https://github.com/adrianmiranda/startup/blob/master/actionscript/build.ad

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment