Its a long time since Adoeb released AIR2 BETA2,but some how I could not got time to play with it till now. Well, here it goes.
First of all there are a couple of ways, one can get started. One is, if you are still in Flex4 SDK (which comes with the new Flash builder), get the new AIR SDK and over-right the old one with the new AIR part of the SDK. That will make you get started. Else, if you always try to be on the challenging and exciting side of things, then I would suggest, get the last nightly build from the opensource.adobe.com. For this test example,I have taken the Build-
Now you need to get the AIR2 BETA2 Runtime, to test and run your AIR2 applications.
There are some minor but must changes to be made to our code, in order to take advantage of the new SDK and Runtime.
- If you are altogether new to Flex 4 (Gumbo) SDK, the first change would be the namespace at the begining of the MXML file.
There are some more changes to Flex4 SDK compared to Flex3 and this article explains what you need to do to migrate your application from Flex3 to Flex4.
All other changes are with the application descriptor file . Lets go one by one here.
- Here again, there is a change to the namespace. If you are using AIR2 beta 2, the namespace will look as below
Make sure it ends with “/2.0beta2“
- Well, AIR2 introduces Native Process access. To get the access to native process of operating system, AIR application must be bundled with a native installer, that means it must be a DMG if its MAC else it would be an EXE for windows. To bundle and take advantage of Native Process, one has to put the below optional tag inside the application descriptor file.
This does not mean, you are bound to one profile. One can add multiple profiles inside the “supportedProfiles” tag. For example
The important thing here is if “supprtedProfile” is set to “extendedDesktop” and the application is tied to be packaged to an AIR file, it simply will not work. It has to be packaged as a native application,which is the next point of discussion. This makes a nice point to the developer as of accidentally compiling to an AIR file when one needed to compile it to EXE or DMG.
- The final thing here is to compile the AIR application as a native application package. This is done by an extra commandline compiler arguement to adt (AIR Developer Tool).
-target native myApp.exe
Thats all if you want to get started with AIR2 and all its new capabilities.
NOTE: After writing of the blogpost, I realised that Adobe has released AIR RC today only. I will keep you updated if there is any change on the RC as to BETA2.
Happy Flashing 🙂