In a previous post I laid out the code for a custom application updater for AIR projects. I have since updated that project to work with Flex 4, including Spark controls and skins. It’s currently skinned to look like the default updater in Flash Builder.
I ran into a strange issue when moving the project from Flex 3 to Flex 4 (SDK 4.1) and wasn’t initially able to read the update.xml file that lives on the server. I had to change both the namespace and add “versionNumber” to the xml file to work with an AIR 2.5 project.
<?xml version="1.0" encoding="utf-8"?> <update xmlns="http://ns.adobe.com/air/framework/update/description/2.5"> <versionNumber>2.0.0</versionNumber> <url>app:/server/UpdateTester.air</url> <description> <![CDATA[Version 2: * Testing the update feature. * More testing and bug fixes, bla, bla, bla.]]> </description> </update>
The entire project is on GitHub. Just download and import it into Flash Builder 4. Remember the application won’t actually update from the IDE, so it will give an error if you try to actually download the update.