Auto-update AIR 2.5 to 2.6

 

Unfortunately the latest release of AIR2.6 in the Flex 4.5 SDK, (bundled with Flash Builder 4.5), has presented a familiar problem trying to auto-update your applications from AIR2.5.

http://forums.adobe.com/message/3650502

We’ve seen this issue before trying to update desktop apps from AIR1.0+ to 2.5 and had to follow a hacky workaround to get users working with the latest version:
http://kb2.adobe.com/cps/873/cpsid_87300.html

Basically you need to create a intermediate version of your AIR2.5 application that includes the AIR2.6 update swc’s and points to a new update XML file (“update_2_6.xml” for example).

/Applications/Adobe Flash Builder 4.5/sdks/4.5.0/frameworks/libs/air/applicationupdater_ui.swc

/Applications/Adobe Flash Builder 4.5/sdks/4.5.0/frameworks/libs/air/applicationupdater.swc)

Every user of your app must come through this version if they are not to have problems down the line updating your app. To ensure they do we need to make your current update XML a dead-end – it will only ever lead to your intermediate update containing the bridge to AIR2.6.

Current update xml: “update_2_5.xml”

<?xml version=”1.0″ encoding=”utf-8″?>

<update xmlns=”http://ns.adobe.com/air/framework/update/description/2.5″>

<versionNumber>0.0.46</versionNumber>

<url>http://www.yourdomain.com/updates/yourapp_v0046.air</url>

<description>This is an intermediate bridge between AIR 2.5 & 2.6</description>

</update>

This is the end of the line for your current update xml file, (“update_2_5.xml”), point it to your intermediate version and never touch the file again. You need to leave it in place on your server as you don’t know when someone will fire up your app next and try to upgrade, could be a day, a month or a year. Going forward you need to start using a new update XML file, call it “update_2_6.xml”, your intermediate update must be checking “update_2_6.xml” for updates.

New update xml: “update_2_6.xml”

<?xml version=”1.0″ encoding=”utf-8″?>

<update xmlns=”http://ns.adobe.com/air/framework/update/description/2.5″>

<versionNumber>0.0.47</versionNumber>

<url>http://www.yourdomain.com/updates/yourapp_v0047.air</url>

<description>This is an AIR2.6 release of my application</description>

</update>

You can now start compiling your application with AIR2.6 safe in the knowledge users will be able to update to it with no issues. Just publish your new updates to your new “update_2_6.xml” file and users will safely navigate through your intermediate update to your latest release.

Summary

 

One Comment on "Auto-update AIR 2.5 to 2.6"

  1. Bigtallbill says:

    Thanks SO MUCH, i was getting so confused by the adobe documentation, been banging my head against a wall for 5 hours!

Got something to say? Go for it!

Spam Protection by WP-SpamFree