Posted By

renaun on 03/30/11


Tagged

actionscript dev tips AIR ios


Versions (?)

Shell Script for packaging AIR applications for iOS


 / Published in: Bash
 

URL: http://renaun.com/blog/2011/03/tips-for-ios-air-development/

If you are developing for iOS with AIR and are deleting/removing applications from iTunes/device each time you want to test you will want to read this.

  1. #!/bin/bash
  2. count=`cat counter`
  3. echo "COUNT: $count"
  4. echo $((count+1)) > counter
  5.  
  6. # Application Name
  7. appname=$1
  8.  
  9. # COMPILE TYPE ( ipa-test | ipa-debug | ipa-app-store | ipa-ad-hoc )
  10. COMPILE_TYPE=$2
  11.  
  12. # UPDATE APP XML (VERSION)
  13. OLD="APP_VERSION"
  14.  
  15. sed "s/$OLD/$count/g" $appname-app.xml > $appname-appV.xml
  16.  
  17. # CONSTANTS
  18. USER_WORKSPACE=/Users/user/Documents/workspaces
  19. AIR_SDK=$USER_WORKSPACE/FlexSDKs/AIR26_mac_sdk_19120
  20. IPHONE_DEV=$USER_WORKSPACE/iPhoneDev
  21.  
  22. rm -Rf *.ipa
  23.  
  24. # BUILDING
  25. startTime=`eval date +%s`
  26.  
  27. $AIR_SDK/bin/adt -version
  28. $AIR_SDK/bin/adt -package -target $COMPILE_TYPE -provisioning-profile $IPHONE_DEV/MyDev.mobileprovision -storetype pkcs12 -keystore $IPHONE_DEV/my_cert.p12 -storepass password $appname.ipa $appname-appV.xml $appname.swf Default.png icon29.png icon57.png icon512.png
  29.  
  30. endTime=`eval date +%s`
  31. let PTIME=($endTime - $startTime)
  32. echo "COMPILE: $PTIME secs"
  33.  
  34. #echo "Opening IPA in iTunes"
  35. open $appname.ipa
  36. osascript -e 'tell application "iTunes" to update "mydevice"'

Report this snippet  

You need to login to post a comment.