Before updating an application using the AIR 2 or earlier Application Updater framework to the AIR 2.5 namespace, update to the AIR 2.5 Application Updater framework. Attempting to update directly to an application using the AIR 2.5 namespace fails.

Make two updates to the application. First update only the Application Updater framework to the AIR 2.5 version. Then update the application descriptor file and the application.

The example below shows the recommended steps for updating an application to the 2.5 namespace. The example assumes that the current version of the application is installed is 1.0. It also assumes that you are updating to version 2.0 that uses the new features in AIR 2.5. Finally, it assumes that all update-related files (update descriptors, new applications) are stored at http://www.example.com/updates/. (Change the path to suit the particular configuration of the application you are updating.)

  • Create an intermediary version of the application, based on version 1.0 of the application. For purposes of this sample, this version is labeled 1.0.1. The new application has to meet the following requirements:
  • Include an updated, AIR 2.5 version of the Application Updater framework (applicationupdater.swc/applicationupdater_ui.swc for Flash based AIR applications or applicationupdater.swf/applicationupdater_ui.swf for HTML based AIR applications).
  • If version 1.0 of the application used the descriptor file at http://www.example.com/updates/update.xml , this intermediary version must use a separate descriptor file (for example, https://www.example.com/updates/update_2.5.xml.) These two update descriptors and their contents are discussed below.

The purpose of this intermediary version is to enable the version to update to the 2.5 namespace.  

  • To trigger existing customers to update to the intermediary version, the developer must change the existing update descriptor to point to version 1.0.1 of the application. This step is done by updating the <version> element of the update descriptor, while preserving the 1.0 namespace for it. A sample file can be seen below:

<?xml version="1.0" encoding="utf-8"?>

<updatexmlns="http://ns.adobe.com/air/framework/update/description/1.0">

<version>1.0.1</version>

<url>http://www.example.com/updates/application_1.0.1.air</url>

<description>This is the latest version of the Sample application.</description>

</update>

Note the usage of the old <version> element and the 1.0 namespace (http://ns.adobe.com/air/framework/update/description/1.0). 

  1. The developer creates the second version of the application that uses any AIR 2.5 specific APIs and the 2.5 namespace. This is version 2.0 of the application. It contains both an updated application update library and uses the update descriptor at http://www.example.com/updates/update_final.xml when checking for further updates.
  2. To enable the users to upgrade from the intermediary 1.0.1 version to the final 2.0 version, create an update descriptor on the site hosting the updates. A sample file can be seen below:

<?xml version="1.0" encoding="utf-8"?>

<update xmlns="http://ns.adobe.com/air/framework/update/description/1.0">

<version>2.0</version>

<url>http://www.example.com/updates/application_2.0.air</url>

<description>This is the latest version of the Sample application.</description>

</update>

 To avoid breaking the update process, change the update descriptors in the production environment only after all the files are in place.

In summary, the following files are present on the server from which the updates are served:

  • update.xml – update descriptor for the intermediary update version. Uses the old update descriptor schema.
  • update_2.5.xml – update descriptor for the final, updated, 2.5-bearing application. Uses the old update descriptor schema.
  • update_final.xml - update descriptor for future 2.5-bearing application updates. Uses the new update descriptor schema.
  • application_1.0.1.air – intermediary update version. It must use a pre-2.5 namespace and include the new, AIR 2.5 Application Updater framework. This application is configured to reference the update_2.5.xml update descriptor.
  • application_2.0.air – the updated application that uses the 2.5 namespace and any 2.5-specific APIs. This application is configured to reference the update final.xml update descriptor.

For additional information on updating AIR applications, see the Updating AIR applications section of the Developing Adobe AIR 1.5 applications guide. 

The application descriptor file schema for applications that use AIR 2.5 is not compatible with earlier versions of the Application Updater framework. Two changes were made to the schema:

  1. The version element is replaced with a new field, versionNumber. This field must contain one to three dot-separated numbers; no non-numeric characters are allowed. For example, valid values are “2” or “4.0.1”. (This change permits the value to be used as the version number when packaging for Android.)
  2. An optional new element called versionLabel can be used to describe the version of the application as it is displayed to the user. There are no restrictions on this value; it can include a string value such as "v1", "2.5", or "Alpha 1". This field is optional. 

<?xml version="1.0" encoding="utf-8"?>

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

<versionNumber>4.0.1</versionNumber>

<url>http://www.example.com/updates/application_4.0.1.air</url>

<description>This is the latest version of the Sample application.</description>

</update> 

During the update process, the Application Updater framework reads the application descriptor from the new version of the application. Since the AIR 2 Application Updater framework is not aware of this schema change, it cannot process updates to versions of an application that use this revised schema.

 

 

 

This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License  Twitter™ and Facebook posts are not covered under the terms of Creative Commons.

Legal Notices   |   Online Privacy Policy