Native extensions for Adobe AIR provide ActionScript APIs that provide you access to device-specific functionality programmed in native code. Native extension developers sometimes work with device manufacturers, and sometimes are third-party developers.
If you are developing a native extension, see Developing Native Extensions for Adobe AIR.
A native extension is a combination of:
- ActionScript classes.
- Native code.
However, as an AIR application developer using a native extension, you work with only the ActionScript classes.
Native extensions are useful in the following situations:
Additionally, if you are interested in decreasing the size of your app and you are not using any DRM functionality, you can manually remove Adobe AIR.vch, adobecp.plugin, adobecp.vch, and AdobeCP15.plugin from the Adobe AIR.framework/Resources subtree inside your app bundle. It is recommended that you use Mac OS 10.7 or higher to upload your app. Adobe AIR for Mac. Free Adobe Systems Mac OS X 10.10/10.6/10.7/10.8/10.9 Version 21.0 Full Specs. Editors' Rating: Editors' Rating: 4. If you are a developer who has to evaluate an application using different versions of Adobe AIR, read the disclaimer at the bottom of this document. For regular use, download the most current and supported version from the Adobe AIR Download Center. The Adobe® AIR® technology enables developers to create and package cross platform games/apps for major platforms like iOS, Android, Windows and Mac OS. Build stunning, blazing-fast cinematic 2D and 3D games for the browser, iOS, and Android™. Use fully accelerated GPU rendering, which leverages. Adobe AIR is available for Mac OS, Windows, Android, and iOS. For Mac OS, it is compatible with version 10.0 and above. AIR SDK development supports Mac OS 10.12 and above. Is there a better alternative? While Adobe AIR is a great choice, you might be looking for a few alternatives.
- The native code implementation provides access to platform-specific features. These platform-specific features are not available in the built-in ActionScript classes, and are not possible to implement in application-specific ActionScript classes. The native code implementation can provide such functionality because it has access to device-specific hardware and software.
- A native code implementation can sometimes be faster than an implementation that uses only ActionScript.
- The native code implementation can provide ActionScript access to legacy native code.
Some examples of native extensions are on the Adobe Developer Center. For example, one native extension provides AIR applications access to Android’s vibration feature. See Native extensions for Adobe AIR.
Adobe recommends | Have a tutorial you would like to share? | ||
Extending Adobe AIROliver Goldman | Developing Android Extensions for AIR3: A Beginner's GuideMilkman Games |
AIR Native Extension (ANE) files
Native extension developers package a native extension into an ANE file. An ANE file is an archive file that contains the necessary libraries and resources for the native extension.
Note for some devices, the ANE file contains the native code library that the native extension uses. But for other devices, the native code library is installed on the device. In some cases, the native extension has no native code at all for a particular device; it is implemented with ActionScript only.
As an AIR application developer, you use the ANE file as follows:
- Include the ANE file in the application’s library path in the same way you include a SWC file in the library path. This action allows the application to reference the extension’s ActionScript classes.Note: When compiling your application, be sure to use dynamic linking for the ANE. If you use Flash Builder, specify External on the ActionScript Builder Path Properties panel; if you use the command line, specify -external-library-path.
- Package the ANE file with the AIR application.
Native extensions versus the NativeProcess ActionScript class
ActionScript 3.0 provides a NativeProcess class. This class lets an AIR application execute native processes on the host operating system. This capability is similar to native extensions, which provide access to platform-specific features and libraries. When deciding on using the NativeProcess class versus using a native extension, consider the following:
- Only the extendedDesktop AIR profile supports the NativeProcess class. Therefore, for applications with the AIR profiles mobileDevice and extendedMobileDevice, native extensions are the only choice.
- Native extension developers often provide native implementations for various platforms, but the ActionScript API they provide is typically the same across platforms. When using the NativeProcess class, ActionScript code to start the native process can vary among the different platforms.
- The NativeProcess class starts a separate process, whereas a native extension runs in the same process as the AIR application. Therefore, if you are concerned about code crashing, using the NativeProcess class is safer. However, the separate process means that you possibly have interprocess communication handling to implement.
Native extensions versus ActionScript class libraries (SWC files)
A SWC file is an ActionScript class library in an archive format. The SWC file contains a SWF file and other resource files. The SWC file is a convenient way to share ActionScript classes instead of sharing individual ActionScript code and resource files.
A native extension package is an ANE file. Like a SWC file, an ANE file is also an ActionScript class library, containing a SWF file and other resource files in an archive format. However, the most important difference between an ANE file and a SWC file is that only an ANE file can contain a native code library.
Note: When compiling your application, be sure to use dynamic linking for the ANE file. If you use Flash Builder, specify External on the ActionScript Builder Path Properties panel; if you use the command line, specify -external-library-path.
Supported devices
Starting in AIR 3, you can use native extensions in applications for the following devices:
- Android devices, starting with Android 2.2
- iOS devices, starting with iOS 4.0
- iOS Simulator, starting with AIR 3.3
- Blackberry PlayBook
- Windows desktop devices that support AIR 3.0
- Mac OS X desktop devices that support AIR 3.0
Often, the same native extension targets multiple platforms. The extension’s ANE file contains ActionScript and native libraries for each supported platform. Usually, the ActionScript libraries have the same public interfaces for all the platforms. The native libraries are necessarily different.
Sometimes a native extension supports a default platform. The default platform’s implementation has only ActionScript code, but no native code. If you package an application for a platform that the extension does not specifically support, the application uses the default implementation when it executes. For example, consider an extension that provides a feature that applies only to mobile devices. The extension can also provide a default implementation that a desktop application can use to simulate the feature.
Supported device profiles
The following AIR profiles support native extensions:
- extendedDesktop, starting in AIR 3.0
- mobileDevice, starting in AIR 3.0
- extendedMobileDevice, starting in AIR 3.0
Task list for using a native extension
To use a native extension in your application, do the following tasks:
- Declare the extension in your application descriptor file.
- Include the ANE file in your application’s library path.
- Package the application.
Declaring the extension in your application descriptor file
All AIR applications have an application descriptor file. When an application uses a native extension, the application descriptor file includes an <extensions> element. For example:
The extensionID element has the same value as the id element in the extension descriptor file. The extension descriptor file is an XML file called extension.xml. It is packaged in the ANE file. You can use an archive extractor tool to look at the extension.xml file.
Including the ANE file in your application’s library path
To compile an application that uses a native extension, include the ANE file in your library path.
Using the ANE file with Flash Builder
If your application uses a native extension, include the ANE file for the native extension in your library path. Then you can use Flash Builder to compile your ActionScript code.
Do the following steps, which use Flash Builder 4.5.1:
- Change the filename extension of the ANE file from .ane to .swc. This step is necessary so that Flash Builder can find the file.
- Select Project > Properties on your Flash Builder project.
- Select the Flex Build Path in the Properties dialog box.
- In the Library Path tab, select Add SWC....
- Browse to the SWC file and select Open.
- Select OK in the Add SWC... dialog box.The ANE file now appears in the Library Path tab in the Properties dialog box.
- Expand the SWC file entry. Double-click Link Type to open the Library Path Item Options dialog box.
- In the Library Path Item Options dialog box, change the Link Type to External.
Now you can compile your application using, for example, Project > Build Project.
Using the ANE file with Flash Professional
If your application uses a native extension, include the ANE file for the native extension in your library path. Then you can use Flash Professional CS5.5 to compile your ActionScript code. Do the following:
- Change the filename extension of the ANE file from .ane to .swc. This step is necessary so that Flash Professional can find the file.
- Select File > ActionScript Settings on your FLA file.
- Select the Library Path tab in the Advanced ActionScript 3.0 Settings dialog box.
- Select the Browse To SWC File button.
- Browse to the SWC file and select Open.The SWC file now appears in the Library Path tab in the Advanced ActionScript 3.0 Settings dialog box
- With the SWC file selected, select the button Select Linkage Options For A Library.
- In the Library Path Item Options dialog box, change the Link Type to External.
Packaging an application that uses native extensions
Use ADT to package an application that uses native extensions. You cannot package the application using Flash Professional CS5.5 or Flash Builder 4.5.1.
Details about using ADT are at AIR Developer Tool (ADT).
For example, the following ADT command creates a DMG file (a native installer file for Mac OS X) for an application that uses native extensions:
The following command creates an APK package for an Android device:
The following command creates an iOS package for an iPhone application:
Note the following:
- Use a native installer package type.
- Specify the extension directory.
- Make sure that the ANE file supports the application’s target device.
Use a native installer package type
The application package must be a native installer. You cannot create a cross-platform AIR package (a .air package) for an application that uses a native extension, because native extensions usually contain native code. However, typically a native extension supports multiple native platforms with the same ActionScript APIs. In these cases, you can use the same ANE file in different native installer packages.
The following table summarizes the value to use for the -target option of the ADT command:
Application’s target platform | -target |
---|---|
Mac OS X or Windows desktop devices | -target native -target bundle |
Android | -target apk or other Android package targets. |
iOS | -target ipa-ad-hoc or other iOS package targets |
iOS Simulator | -target ipa-test-interpreter-simulator -target ipa-debug-interpreter-simulator |
Specify the extension directory
![Adobe air download from adobe Adobe air download from adobe](/uploads/1/1/8/9/118934588/477120114.jpg)
Use the ADT option -extdir to tell ADT the directory that contains the native extensions (ANE files).
For details about this option, see File and path options.
Make sure that the ANE file supports the application’s target device
Adobe Air Installer
When providing an ANE file, the native extension developer informs you which platforms the extension supports. You can also use an archive extractor tool to look at the contents of the ANE file. The extracted files include a directory for each supported platform.
Knowing which platforms the extension supports is important when packaging the application that uses the ANE file. Consider the following rules:
- To create an Android application package, the ANE file must include the Android-ARM platform. Alternatively, the ANE file must include the default platform and at least one other platform.
- To create an iOS application package, the ANE file must include the iPhone-ARM platform. Alternatively, the ANE file must include the default platform and at least one other platform.
- To create an iOS Simulator application package, the ANE file must include the iPhone-x86 platform.
- To create a Mac OS X application package, the ANE file must include the MacOS-x86 platform. Alternatively, the ANE file must include the default platform and at least one other platform.
- To create a Windows application package, the ANE file must include the Windows-x86 platform. Alternatively, the ANE file must include the default platform and at least one other platform.
Adobe Air For Macbook
Apple has changed Apple Mac App Store requirements and methodologies and that resulted in changes to the AIR runtime itself. This document explains how to post updated AIR applications to the Mac App store.
![Adobe for macbook Adobe for macbook](/uploads/1/1/8/9/118934588/177166657.jpg)
Steps to Post an AIR Application to the Mac App Store
Note:
Adobe Air Uninstaller For Mac
Posting an application to the Mac App Store requires manual steps. Make sure that you have a Mac developer account with Apple.
- Package your app with a captive runtime. The Mac App Store only accepts self-contained apps, and doesn't allow apps that use the shared AIR runtime. After packaging your .app bundle, manually open your Info.plist file in your favorite XML editor. Add an LSApplicationCategoryType entry.
- Also add a 512x512 icon to your Icon.icns file. (Currently the adt tool does not support icons of this size on Mac.) You can use Icon Composer (available with the xcode tools) to resize.
- Apple places several restrictions to post on the Mac App Store, including:
- The locations an app can write to
- The APIs an app can use (non-public APIs are not allowed)
- And the resources an app is allowed to use.
- WebKit uses a few non-public APIs that are not allowed on the Mac App Store, so you cannot use HTMLLoader or any class in the flash.html package in your app. Manually remove WebKit.dylib and Flash Player.plugin from the Adobe AIR.framework/Resources subtree inside your app bundle. You can use the StageWebView class but only when created with useNative=true.
- Additionally, if you are interested in decreasing the size of your app and you are not using any DRM functionality, you can manually remove Adobe AIR.vch, adobecp.plugin, adobecp.vch, and AdobeCP15.plugin from the Adobe AIR.framework/Resources subtree inside your app bundle.
- It is recommended that you use Mac OS 10.7 or higher to upload your app. There is a bug in Mac OS 10.6 that prevents Apple’s Application Loader from successfully uploading your app with the AIR runtime. To upload from Mac OS 10.6, there is a workaround:
- Delete the “Resources” symbolic link in the AIR framework folder and create a true folder called “Resources”.
- Copy the AIR Info.plist file (from Versions/1.0/Resources) into this new folder. Modify the original Info.plist file (inside Versions/1.0/Resources) by renaming the bundle id to com.adobe.AIR1.
Adobe Air For Mac Os Mojave
Once your app package is ready, launch Terminal, and do the following:
Adobe Go Get Air Free Download
- Install your Developer Application and Developer Installer certificates on the Keychain. Use Apple's Developer Certificate Utility to create and install the certificates. The developer certificates refer to the 'WWDR Intermediate Certificate' and to the 'Apple Inc. Root Certificate'. These certificates are not required to be in the Keychain to sign an app. If needed, they can be obtained from Apple Root Certification Authority.
- Sign your app with your Mac Application account certificate.textcodesign -f -s '3rd Party Mac Developer Application: XXX' --entitlements ZZZ.entitlements YYY.appwhere XXX is the name on your cert, YYY is the name of your app, and ZZZ is an entitlements file. The entitlements file provides the list or resources and features the app is allowed to access.
- Build a .pkg installer for your app that is signed with your Mac Installer account certificate.productbuild --component YYY.app /Applications --sign '3rd Party Mac Developer Installer: XXX' YYY.pkgIf you are missing the productbuild tool, make sure that you have xcode 3.2.6 or above installed.
- Delete or zip the .app file after productbuild has created the .pkg (otherwise the installer test doesn't work).
- Install your app as if it came from the store.sudo installer -store -pkg YYY.pkg -target /
- Verify that your app is installed in Applications and is launchable.You are now ready to upload your app. Before doing so, you must create meta-data for your app on iTunes Connect.
- Log in using your Apple ID.
- Follow the Manage Your Applications link.
- And click the Add New App button to create the meta-data.
Then, use Application Loader to upload the app for review. (Application Loader is part of Xcode tools, versions 3.2.6 and above. Application Loader is also available as a stand-alone download). You find out right away if your application bundle is well-formed. But it takes a few days to find out if Apple approved it or not.In particular, if you are using a self-signed certificate you could get the following warning from iTunes Connect:Adobe has discovered one or more issues with your recent binary submission for 'YYY'. Your app has proceeded to review, but the following issues should be corrected in your next submission:
Invalid Signature - the nested app bundle (YYY.app/Contents/Frameworks/Adobe AIR.framework) is not signed, the signature is invalid, or it is not signed with an Apple submission certificate. Refer to the Code Signing and Application Sandboxing Guide for more information.