Copy link to clipboard
Copied
Welcome to the AIR Runtime and SDK version 28 beta! We've been hard at work adding new features to AIR and we're looking forward to receiving feedback from our development community.
This beta release includes new features as well as enhancements and bug fixes related to security, stability, performance, and device compatibility for AIR Runtime and SDK 28. For full details, please see our release notes
Swift based ANE Support in AIR (iOS/tvOS)
Starting AIR 28, developers will be able to use Swift based ANE for iOS/tvOS. Developers can also use iOS/tvOS based Dynamic Frameworks while packaging the application for respective iOS/tvOS platforms. Dynamic Frameworks signing will be done while packaging the application.
Steps to create Swift ANE and packaging application:
1. Along with the existing necessary resources for ANE creation, AS developers also need to include dynamic frameworks (relevant .framework files) during ANE creation command. The platform.xml also needs to mention the dynamic frameworks as shown below.
<?xml version=
"1.0"
encoding=
"utf-8"
?>
<platform xmlns=
"http://ns.adobe.com/air/extension/28.0"
>
<linkerOptions>
<option>-rpath
@executable_path
/Frameworks</option>
</linkerOptions>
<packagedDependencies>
<packagedDependency><dynamic_swift_framework_path></packagedDependency>
</packagedDependencies>
</platform>
2. Sample ANE packaging command.
adt -
package
-target ane <ane_file> <extesionxml_file> -swc <swc_file> -platform iPhone-ARM -platformoptions <platformxml_file> -C iPhone-ARM/ . -platform appleTV-ARM -platformoptions <tvOS_platformxml_file> -C appleTV-ARM/ .
3. Sample IPA Packaging command
adt -
package
-target <target> -provisioning-profile <path-to-profile> -storetype pkcs12 -keystore <path-to-certificate> -storepass <password> <ipa_file> <appxml_path> <swf_path> Frameworks -extdir extension
Where the <dynamic_frameworks_and_Swift_Dependencies_path> folder, or subfolders inside it contain Swift Frameworks and its dependencies as mentioned below. These Swift dylibs can be found at /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphoneos for iOS
<dynamic_swift_framework>
For Xcode 9 and Swift 4 support, AS Developers also need to add 3 more swift dependencies as below from iphoneos folder from Xcode.
Note - Default MinimumOSVersion values for iOS is 8.0 and for tvOS is 9.0.
AIR Runtime is now built with iOS 11 SDK, which enables AIR developers to use ANEs built with iOS 11 APIs without using the –platformSDK switch while packaging with ADT. With iOS 11 SDK, Apple has mandated inclusion of a few icons in the application. Follow the steps below to incorporate them:
Note: You need to have a Mac machine having Xcode 9.
Launch Xcode 9.
All these icons except store icon (1024*1024) need to be packaged along with the application using the icon tags in the app.xml. Refer https://help.apple.com/xcode/mac/current/#/dev4b0ebb1bb for adding icons in assets.car file.
Note - If you are targeting iOS 11 as the minimum supported OS in the application descriptor, the generated IPA will be 64bit only.
Starting AIR 28, developers can provide localized purpose strings for the permissions required in the application. Developers are required to package an xml file called purposeStrings.xml in the application. Format of this xml file should adhere to the following. A sample xml file is available in AIR SDK at SDK/samples/purposeStrings-sample.xml. Use below mentioned command to package a sample application using purposeStrings.xml file.
adt -
package
-target <target> -provisioning-profile <provisioning profile> -storetype pkcs12 -keystore <certificate> -storepass <password> <name of the ipa> <application xml> <swf file> purposeStrings.xml
Note - With iOS 11 Apple has added few new cocoa keys which should be included in your application descriptor file, see Information Property List Key Reference | Cocoa Keys.
Beginning AIR 28, Android SDK has been upgraded in the AIR Runtime. Here is the list of version numbers of the tools upgraded in AIR 28. There have been significant changes in the tools used to build the runtime. Raise your issues on AIR user forums if you observe any performance or functional issues.
Tool | Version |
---|---|
Android SDK Platform | 25 ver 3 (Android 7.1.1) |
Android SDK build tools | 26.0.1 |
Android SDK tools | 26.0.2 |
Android SDK platform tools | 26.0.0 |
Android NDK | 15.1.4119039 |
Android Support Repository | 47.0.0 |
With AIR 28, Android TV support for AIR Android applications comes with more stability and improvements.
Developers can develop captive runtime applications that are also compatible with Android TV. Use swf-version 31 or greater and namespace 20.0 or greater to access this feature. The two tags mentioned below needtobeadded in the app.xml file to support Android TV applications.
1. <supportsAndroidTV></supportsAndroidTV>
Value for the <supportsAndroidTV> tag can be either "true" or "false". If this tag is not added, then the default value will be "false".
<supportsAndroidTV>true</supportsAndroidTV>:Applicationissupported on Android TV and it will reflect on the home screen of Android TV after the installation.
<supportsAndroidTV>false</supportsAndroidTV>:Applicationisnot supported on Android TV and it will not be shown on the home screen of the Android TV. However, it will be reflected in the downloaded apps inside Settings of the device.
2.<banner></banner>
This is thetagwhereusercangivethe banner image path. Application Banners represent your app or game on the home screens of TV devices and serve as a way for users to launch the app. The specific requirements for a banner image are 320 x 180 px, .png,xhdpiresource. Incasedeveloperdoesnot providethe banner image with <supportsAndroidTV>true<supportsAndroidTV> tag, a default banner image will reflect on the home screen of Android TV. SDK tools should be updated to version 24.0.0 or higher. In order to access new APIs for TV devices, you must create a project or modify an existing project that targets Android 5.0 (API level 21) or higher. Applications can only be packaged with –targetapk-captive-runtime for Android TV. Android TV support is available from AIR SDK 20.0 or higher, and so the namespace needs to be added accordingly inapp.xmlfile.
Sample snippet - Make the below changes in app.xml file parallel to <containsVideo> tag:
<android>
<manifestAdditions><![CDATA[
<manifest android:installLocation=
"auto"
>
.
..
.
</manifest>
]]></manifestAdditions>
<supportsAndroidTV>
true
</supportsAndroidTV>
<banner>
"path of the banner image (320x180 px, .png file)"
</banner>
</android>
ADT supports a new option -embedBitcode to add bitcode in your iOS and tvOS applications. For more information about Bitcode, see the App Distribution Guide.
Switch details:
Name of the
switch
: -embedBitcode
Values(iOS): yes or no. Defaults to no
Values(tvOS):yes or no. Defaults to no(yes
for
ipa-app-store target as it is a mandatory requirement by Apple)
Usage: -embedBitcode yes
Order: Just before the code signing options
Example ADT packaging command:
<AIRSDK>/bin/adt -
package
-target <target type> <other options> -embedBitcode yes -provisioning-profile <SampleProvisioning.mobileprovision> -storetype pkcs12 -keystore <SampleCert
Notes:
ld: bitcode bundle could not be generated because '/var/folders/d3/yxwv5yn5715fk31lq36lnk780000gn/T/805ef2d4-5fe2-4ec9-a773-a3cc39845fa1/lib.nativeExtension.systemVersion.a(systemVersion.o)' was built without full bitcode. All object files and libraries for bitcode must be generated from Xcode Archive or Install build for architecture arm64
Compilation failed while executing : ld64
We have made some enhancements to tvOS support. For more information, see the Release Notes specific to this feature. AIR Runtime is now builtwithtvOS 11 SDK, which enables AIR developers to use ANEs builtwithtvOS 11 APIs without using the –platformSDK switch of ADT.
The Audio Device Manager ActionScript API was added in Flash Player 27. This functionality is now enabled in AIR starting from AIR 28 for Desktop only. This API provides the functionality of selecting audio output devices. AIR app developer should build their own UI to list the available audio devices in a system and select the device for playback.
When an AIR app is launched, the audio output will play through the system default device. The user can change the audio output device. The selection is valid only for the current session of the AIR app. On-relaunch of the app, the audio will play through system default device.The developer is responsible for the storage of the user selection if it is required.
The audio device selected in one AIR application does not affect the audio from the other AIR applications or Flash Player instances.
The User Invoked Action(UIA) restriction is applicable when an external SWF/HTML which is hosted over the network is loaded by the AIR application. The UIA check implies that the audio device can be changed by user interaction only. If the externally loaded SWF/HTML tries to change the audio output device without anyuserinvokedaction, then AIR runtime throws an error "IllegalOperationError" with error code 2176.
More information about the Audio Device Manager API is available at https://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/media/AudioDeviceManager.h...
Sample Snippet :
var status_ta:TextField =
new
TextField();
status_ta.width =
200
;
addChild(status_ta);
var audio_device_manager:AudioDeviceManager = AudioDeviceManager.audioDeviceManager;
var audio_output_device_array:Array = audio_device_manager.deviceNames;
var selected_audio_device:String = audio_output_device_array[audio_device_manager.selectedDeviceIndex];
status_ta.text =
"The default device is: "
+selected_audio_device+
"\n"
+
"\n"
;
status_ta.text +=
"You have "
+audio_output_device_array.length+
" device(s) available."
+
"\n"
+
"\n"
;
for
(var i =
0
; i<audio_output_device_array.length; i++) {
status_ta.text +=
"["
+i+
"] "
+audio_output_device_array+
"\n"
;
}
Select an audio output device
var audio_device_manager:AudioDeviceManager = AudioDeviceManager.audioDeviceManager;
audio_device_manager.selectedDeviceIndex = desired_audio_output_index;
Monitor audio output change
function audioOutputChangeHandler(evt:AudioOutputChangeEvent):
void
{
if
(evt.reason == AudioOutputChangeReason.USER_SELECTION) {
[
do
something]
}
else
if
(evt.reason == AudioOutputChangeReason.DEVICE_CHANGE) {
[
do
something]
}
}
Till AIR 27, there was no option in AIR to set the preference for use of either of the GPU types. It uses the default GPU type as set by the OS: integrated GPU on Windows and the discrete GPU on Mac OS X.
With AIR 28, developers can set a preference for the use of the specific GPU type, in the AIR application descriptor by adding the "<gpuPreference>" element in the application descriptor as follows:
<application>
<gpuPreference>(discrete|integrated)</gpuPreference>
</application>
The AIR application developer can set the preference for the discrete GPU for better performance, or the integrated for better battery life. This feature is supported only on devices that are equipped with both an integrated GPU and a discrete GPU, and with OSes that support GPU switching functionality.
For system requirements of the current release of AIR in production, visithttp://www.adobe.com/products/air/systemreqs/
To get the latest Beta build of AIR Runtime and SDK visit Adobe labs
If you would like real-time notification for announcements related to the AIR Beta Channel please follow the Flash Runtime Announcements forums by choosing "Follow this forum" from the right-hand menu on the Forums page.