Monday, May 2, 2011

Getting your application version number in AIR 2.6

 The following code reads the application version from the appname-app.xml file in your project directory. Note that your app version is now stored in the "versionNumber" tag - a slight departure from the older AIR syntax where the version was stored in a "version" tag.

var descriptor:XML = NativeApplication.nativeApplication.applicationDescriptor;
var ns:Namespace = descriptor.namespaceDeclarations()[0];
var version:String= descriptor.ns::versionNumber;

Flex 4.5 - from excitement to disappointment

OK. Now I'm sad. Really sad.
I'd been reading up on Flex Hero/FB Burrito and the new Air 2.6 release, and tbh I thought it might be the answer to all my PhoneGap issues. A Flex rewrite! YEAH! I was stoked! I wanted to get started right away.

THEN I realized there's no access to native device info like the UDID or OS version. Damn. I could probably do without the OS version, but the lack of a UDID is a deal-breaker for us, as we use it for one-device-one-app checks.

I know the wider solution to this problem is for Adobe to allow native calls and callbacks, but really I'd settle for just the ability to get the UDID.

Sigh. Looks like we're keeping the PhoneGap. Sniff sniff.