Creating the extension descriptor file

Each native extension contains an extension descriptor file. This XML file specifies information about the extension, such as the extension identifier, name, version number, and the platforms that it can run on.

When creating extensions, write the extension descriptor file according to the detailed schema Native extension descriptor files .

For example:

<extension xmlns=""> 
                    <platform name="Android-ARM"> 
                    <platform name="iPhone-ARM"> 
                    <platform name="default"> 

Consider the following information when creating your extension descriptor file.

The extension ID

The value of the <id> element is the same value used in:

  • the ActionScript call to CreateExtensionContext() .

  • the extensionID element in the application descriptor file of an application that uses the extension.

For best practices for naming the extension ID, see The extension ID .

The version number

The value of the <versionNumber> element is for specifying the version of the extension. One important use of the version number is for maintaining backward compatibility on device-bundled extensions. See Native extension backward compatibility .


You can write a native extension that targets multiple platforms as discussed in Targeting multiple platforms .

Depending on the platform, the extension is either application-bundled or device-bundled, as discussed in Extension availability at runtime .

For each targeted platform, provide a < platform > element in the extension descriptor file. The <platform> element’s name attribute specifies the target platform, such as iPhone-ARM or Windows-x86 . Application-bundled extensions can also specify default for the name attribute value. This value indicates that the extension is an ActionScript-only extension; the extension has no native code libraries.

When an AIR application that uses an application-bundled extension runs, AIR does the following:

  • AIR loads the extension libraries that the extension descriptor file associates with the platform name that corresponds to the device’s platform.

  • If no platform name corresponds to the device, AIR loads the extension libraries that the extension descriptor file associates with the default platform.

Descriptor namespace

The namespace specified in the root <extension> element of the descriptor file determines the version of the AIR SDK required by the extension. The namespace is one of the factors, along with SWF version, that determine whether an extension can be used in an AIR application. The AIR application descriptor namespace must be greater than or equal to the extension descriptor namespace.

Extension namespace value

Compatible AIR version

ANE SWF version

AIR 3+


AIR 3.1+


AIR 3.2+


AIR 3.3+


AIR 3.4+


AIR 3.5+


AIR 3.6+


AIR 3.7+


Note: The platform options (platform.xml) file requires the namespace or later. If you are using the ‑platformoptions flag to package your ANE, you must specify or later and a SWC version greater than or equal to 14. Some platform options file features require later AIR namespace and SWF versions.

// Ethnio survey code removed