Rectangle 27 9

You can build iPhone apps from CS5 without any other tools by creating a new iPhone project. However, in order to target android and get the latest performance improvements for iOS, you should be using Adobe AIR 2.6 and the ADT. The ADT can only be used from the command line currently, though it will be integrated into Flash CS5.5 and Flash Builder 4.5.

The ADT accepts an AIR SWF file as input and the AIR 2.6 namespace can be specified in the app descriptor xml file. This means it is possible to target Android and iOS from Flash CS5 by creating an air project, specifying the AIR 2.6 namespace in the app descriptor xml, and then using the ADT to package the apps. The two platforms vary a little in what is required in the app descriptor and the command line options used are slightly different. Additionally the iOS platform requires an active iOS developers certificate.

Information on the command line options used in the ADT on the iOS certificate requirements can be found here.

UPDATE - Here's a quick run through of setting up a FlashDevelop workflow for Android and iOS development.

First download FlashDevelop and allow it to automatically download and install the latest Flex SDK. The default path is C:\Program Files\FlashDevelop\Tools\flexsdk\bin. Once you have FD up and running, download and install the AIR 2.6 SDK which includes the ADT used to create native mobile applications. To install the AIR 2.6 SDK you extract it into the Flex SDK folder, overwriting any changes.

Make sure you can compile SWFs using FlashDevelop. There are a few different paths you can go down to build your SWF, probably the easiest to get started if you're familiar with Flash is using Flash Professional to compile. Make sure you set up your FLA to use ActionScript 3 and target Flash Player 10 (this should actually be set to AIR 2.6 but the Flash CS5 IDE doesn't support it).

Alternatively you can use Flash CS5 for asset management only or avoid CS5 altogether and embed assets directly into your AS3 code. The FlashDevelop forums are probably the best place to find this info.

Once you have SWFs compiling, you can set up your application descriptor xml (additional mobile specific info here). You will also require a developers certificate to create Android apps, and a developers certificate and mobile provisioning file to create iOS apps. Once you've got all the necessary pieces (SWF, App descriptor file, developers certificates and provisioning file) you can use the ADT to package your swf file into a native app. The ADT is a command line tool found in the AIR 2.6 SDK (now in your Flex SDK directory).

The command line structure I use to test on android is:

Some sources I've seen specify an .air file as the input. This isn't necessary. A swf works fine.

And for iOS:

There are additional command line options you can use to specify app icons and other external assets that can be found here.

I recommend creating a batch file to call the ADT for both Android and iOS once you've got the command line options sorted. This lets you build for two platforms with one click. There is a way to call the ADT from FlashDevelop, but I found that the batch file is easier to create and maintain.

UPDATE 2 - This answer is quite outdated now. FlashDevelop now does most of the grunt work for you including downloading the latest SDK and handling the ADT options. I strongly suggest you check it out if you're interested in mobile development using actionscript.

If you don't mind, I could use some help getting the right tools here. I'm an avid iPhone and Android developer (native), but Adobe has an overwhelming amount of information on their sites that I am left unsure. So Lets say I download FlashDevelop. What else do I need to download? Adobe Air? Flex? Then how do I start? I am very eager to learn Flex/Actionscript and make cross platform applications, but I need a "Hold your hand" tutorial to get started. There is too much information scattered across too many facets.

Hi @spentak. I agree, the documentation is pretty terrible. I've updated my original answer with the method I used to set up my development workflow. Hopefully it'll get you started. Let me know if anything is unclear.

Ethan, Amazing answer! This puts me in the right direction here. Thanks much!

flex - Flash Builder 4.5 vs Flash? - Stack Overflow

flash flex actionscript-3 air
Rectangle 27 0

Just had the same problem. Specifically when trying to compile an "Extended Desktop" app on Mac. The trick was to add "-target native" and change your output to myApp.dmg

[dropped ADT file path] package -storetype pkcs12 -keystore [dropped cert.p12 file path] -target native myApp.dmg [dropped myApp-app.xml file path] [dropped myApp.swf file path] [dropped myIcon.png file path] [dropped ADT file path] package -storetype pkcs12 -keystore [dropped cert.p12 file path] -target native myApp.dmg [dropped myApp-app.xml file path] [dropped myApp.swf file path] [dropped myIcon.png file path]

For reference the error I was receiving before was "error 306: Descriptor must support one of the following profiles: desktop, mobileDevice, extendedMobileDevice, tv"

Also if you get an "error 302: Root content myApp.swf is missing from package" it's because you haven't dropped the path in to your swf, or your not running the command from within in your application folder (weird).

Sign up for our newsletter and get our top new questions delivered to your inbox (see an example).

flash - How to use ADT to package an AIR application? - Stack Overflow

flash actionscript-3 air adt package-managers
Rectangle 27 0

this is the current site for ADT commands. follow the link to the subsection on ADT package commands.

if you are packaging for AIR 2.7, you will need to change the myApp-app.xml file to reflect the SDK version:

<?xml version ="1.0" encoding="utf-8" ?>
<application xmlns="http://ns.adobe.com/air/application/2.7">
...

packaging AIR apps is super easy - don't let the command line frighten you.

if you're on a Mac you can drag and drop files into Terminal instead of having to write out their complete path. start by dropping onto the command line AIR SDK > bin > adt, followed by:

now on the same line, drag in your cert.p12 file, followed by what you want to name your air package, IE "myApp.air", followed by your application discriptor .xml file, your .swf file and any other files related to the package (such as your application icon). make sure there is a space between each command line argument.

then hit return, enter the password for your cert.p12 file, and ADT will package your AIR application according to the current director of Terminal, or you can also supply a path for your myApp.air argument and it will be written there, IE: /Users/me/Desktop/myApp.air

I am on Win 7 and I still couldn't do it. The cmd tells me that couldn't access the air file specified. I worked on a workaround already, although.

My solution was to create .txt files on a folder from AIR and make the other application access them for instructions on how to behave.

flash - How to use ADT to package an AIR application? - Stack Overflow

flash actionscript-3 air adt package-managers
Rectangle 27 0

There are actually a couple of steps to doing this. First, and this is what I have found to be the easiest solution, is to build an AIR Intermediate file from Flash Builder 4.5. Once that file is built, use the adt command line packager with the "-target bundle" flag to sign and package the a Mac OSX application bundle. This will result in a fully working captive runtime application bundle that you can run on OSX. When you have completed the Adobe side of things and have verified that is runs correctly you can move on to the Apple side.

I would recommend you reference Apple's developer documentation for this here: Submit Your Application using Application Loader. You will need to use both the "codesign" and "productbuild" commands on the application bundle you created from Adobe's packager. When done, you should now be able to use Apple's Application Loader to submit the package to the Mac App Store.

I have not yet tried to sign the AIRI package with my Apple certificate, so I'm not sure if that would work, since I have both an Thawte cert for Air apps and the Apple issued one. This would take further testing.

Yes, I think I would do the following steps: 1) Repackage the SWF into a .app using "adt -target bundle" 2) codesign the .app file 3) productbuild the .app file 4) Upload the app. It's just pretty tedious and if I mess up on any of these steps, it takes time to figure out where I went wrong. So, if anyone already knows how, that would be helpful!

@William Umm, that is how. The only thing I have had no issue double signing the file once with my AIR code signing cert, and the app with the apple developer profile cert as the document I linked to explains. The only ambiguous thing is if you can use the Apple issued cert for both steps. I've never tried because I've had to code sign the app and an AIR package. These steps are not very time consuming, I often work with 1GB+ AIR packages and this takes just a few minutes. If you are using more normal size files the time should be nominal.

I'm having trouble signing the .AIRI file with the Apple certificate. I get the following error: Unable to build a valid certificate chain for the signer.. I searched the forums and found that the root Apple certificate is needed to be included in the .p12 file. A number of people seemed to work through this using Windows, but selecting all 3 in Mac doesn't seem to do the trick. I am determined to get this Flash app into the Mac App Store!

I wasn't able to get this to work on a Mac, but I created a .p12 that included the entire chain via Windows. But now, when I use ADT, I get the following error: Exception in thread "main" java.lang.OutOfMemoryError: Java heap space

osx - Is it possible to get an AIR 3.0 Captive Runtime app into the Ma...

osx air store