Use -plaformsdk to package external iOS SDK with Flash CS5.5 using ADT via Terminal
I wanted to make an iPhone app for the new iPad 3, to do this you have to use iOS 5.1. This involves doing a few tricky things. Firstly you can only currently do this on a mac running the latest version of lion (at the time of writing) as you need Xcode 4.3.2, so if you have that here's what you do:
1. Get Xcode here: https://developer.apple.com/xcode/
2. Get the latest version of the Air SDK and overlay it (3.2 at the time of writing), instructions are here: http://helpx.adobe.com/x-productkb/multi/overlay-air-sdk-flash-professio..., the version attribute of the player tag must be changed from 11 to 15 (in the linked article its 13). Google "overlay air 3.2" for lots more help.
3. Make your iPhone app and publish it normally so you create the swf and xml
Now you need to use ADT via Terminal, you'll be using the version of iOS from Xcode rather than the one supplied with Flash, this is a bit tricky so i'll list these steps separately. To explain a few things - the new version of iOS lives here:
and ADT lives here:
/Applications/Adobe\ Flash\ CS5.5/AIR2.6/bin/adt
To find the correct path to anything (and it must be correct or it won't work) just open a new Terminal window and drag the folder/file into that window - Terminal will display the full path. So in the code below all you need to do to get the correct path to your .p12 file and provisioning profile is just drag that file into terminal when typing/correcting the code.
Now do this:
1. Open Terminal
2. Type 'cd ' and drag the folder containing your application into terminal and hit enter, you be presented with something like the following
3. Copy the following code, but replace the following:
if you're testing use ipa-test as below, for the store use ipa-app-store
/path_to_provisioning_profile/Provisioning_Profile.mobileprovision - path to your provisioning profile
/path_to_certificate/certificate.p12 - path to your certificate
xxxxx - your certificate password
application_xml_file.xml - your application xml file (this assumes you've already navigated to the folder they're in - step 2)
application_swf.swf - your application swf file
Default.png 48.png 29.png 57.png 114.png 72.png - any assets you need to include
/Applications/Adobe\ Flash\ CS5.5/AIR2.6/bin/adt -package -target ipa-test -provisioning-profile /path_to_provisioning_profile/Provisioning_Profile.mobileprovision -storetype pkcs12 -keystore /path_to_certificate/certificate.p12 -storepass xxxxx myApp.ipa application_xml_file.xml application_swf.swf -platformsdk /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.1.sdk Default.png 48.png 29.png 57.png 114.png 72.png
hit return and it will ask for your computer password, then if it doesn't immediately return an error the com.adobe.air.ADT application will open. I got a whole load of 'ld: warning: ARM function not 4-byte aligned' type errors in the Terminal, but the app still built ok so I think these can be ignored.