0 Replies Latest reply on Nov 16, 2017 6:34 AM by Milind.Jha

    11/16/2017 - Beta - AIR 28.0.0.112

    Milind.Jha Adobe Employee (Admin)

      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

      New and Updated Features

      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/ .
      

       

      • iPhone-ARM folder contains dynamic_swift_framework_file as mentioned in package dependencies in platform_xml, Objective C Static library (.a) built for iOS and library.swf file.
      • appleTV-ARM folder contains dynamic_swift_framework_file for tvOS as mentioned in package dependencies in tvOS_platform_xml, Objective C Static library (.a) built for tvOS and library.swf file.

       

      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/sw ift/iphoneos for iOS

      <dynamic_swift_framework>

      • libswiftCore.dylib
      • libswiftCoreGraphics.dylib
      • libswiftCoreImage.dylib
      • libswiftDarwin.dylib
      • libswiftDispatch.dylib
      • libswiftFoundation.dylib
      • libswiftObjectiveC.dylib
      • libswiftQuartzCore.dylib
      • libswiftUIKit.dylib

       

      For Xcode 9 and Swift 4 support, AS Developers also need to add 3 more swift dependencies as below from iphoneos folder from Xcode.

      • libswiftCoreFoundation.dylib
      • libswiftMetal.dylib
      • libswiftos.dylib

      Note - Default MinimumOSVersion values for iOS is 8.0 and for tvOS is 9.0.

      iOS SDK Upgrade

      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.

      • Select File -> New Project -> Single View App (iOS). Fill Product Name, Organization Name and Organization Identifier (no specific names required).
      • Save the project.
      • Click Assets.xcassets -> AppIcon -> Drag and drop App store icon of size 1024 * 1024 (1024pt, 1x).

       

      xcassests 1.jpeg

      • Drag and drop iPad App icon of size 76x76 (76pt, 1x) & 152x152 (76pt, 2x).
      • Drag and drop iPad Pro App icon of size 167x167 (83.5pt, 2x).
      • Drag and drop iPhone App icon of size 120x120 (60pt, 2x).
      • Drag and drop iPhone App icon of size 180x180 (60pt, 3x).

      XCAssets 2.png

      • In the drop-down select Generic iOS Device as the build target.
      • Build the project ( Project -> Build).
      • Right-click on your ‘.app’ -> Show in finder.
      • Right click on your ‘.app’ -> Show package contents.
      • Now copy Assets.car and package with AIR application.

      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.

      Localization of permission purpose strings on iOS

      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.

       

      Android SDK Upgrade

      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 Platform25 ver 3 (Android 7.1.1)
      Android SDK build tools26.0.1
      Android SDK tools26.0.2
      Android SDK platform tools26.0.0
      Android NDK15.1.4119039
      Android Support Repository47.0.0

      Android TV Support

      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>
      

      Support for embed bitcode in iOS/tvOS

      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:

      • Embeddingbitcodeenables AIR developers to upload their tvOS applications on the AppStorewherebitcodeisrequired.
      • Embeddingbitcodein your application increases both application size and packaging time.
      • Embeddingbitcoderequires that all your ANEsalsoincludebitcode. If not present,adtcanthrowpackaging errors such as the following:

      ld: bitcode bundle could not be generated because '/var/folders/d3/yxwv5yn5715fk31lq36lnk780000gn/T/805ef2d4-5fe2-4ec9-a773-a3cc39845fa1/li b.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

      Apple TV support  (Beta Quality)

      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.

      AIR Desktop - Audio Device Manager ActionScript API

      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/AudioDevic eManager.html

      Sample Snippet :

      Access system available audio device names

      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[i]+"\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]
          }
      }
      

      AIR Desktop- Support for selection of GPU preference in multi-GPU system

      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.

      Known Issues

      • Flash Builder quits unexpectedly on High Sierra when "Export release build" is selected from the Project menu.
      • GESTURE_PAN event is not triggered on Mac
      • Some rendering issues related to direct render mode are known for e.g. BitmapData, CacheAsBitmap, cacheAsBitmapMatrix, PerspectiveTransform and related areas.
      • [Android] Stage shift offset error on StageText focus (AIR-4198421)
      • [Android] Banner.png is missing from apk packaged for Android TV
      • [Android] Camera miniature display at top-left corner when StageVideo video playback (AIR-4130641)

      Fixed Issues

      • AIR runtime quits unexpectedly after graphics.readGraphicsData when graphics.readGraphicsData is called.(AIR-4198466)
      • Initiating multiple workers simultaneously causes the application to quit unexpectedly.(AIR-4198267)
      • Anti-aliasing on retina OS X desktop display fails/degrades when Context3D backBuffer is set to 1024x768 or greater.(AIR-4198319)
      • Bitmap glitches are observed while drawing pixels(AIR-4198453)
      • [iOS]Artifacts are observed when child Sprite is near bottom of screen(AIR-4198445)
      • [iOS] ADT to correctly sign dynamic frameworks included packaged with iOS app (AIR-4198407)
      • [iOS] ADT to correctly sign dynamic frameworks (AIR-4198408)
      • [IOS] AIR 23 and newer: Compilation failed while executing : compile-abc - Class (...) could not be found. (AIR-4198225)
      • [iOS] StageWebView does not load nor display local HTML content (AIR-4198420)
      • Improving capabilities.language behavior for Android and iOS
      • [iOS] Launch image issues on iPad Pro
      • [Android] Error #3672: Buffer creation failed when using drawToBitmapData (Context3D) while using VideoTexture (AIR-4198290)
      • [Android] No data from "android.intent.action.SEND" Intent on Android (AIR-4197491)
      • Rotate Image Camera IMAGE Mobile Android/IOS (AIR-4167837)
      • [iOS] Interfaces don't function on iOS when shared between swf's (AIR-4194914)
      • [iOS] Apps created using Flex in AOT mode crashes (AIR-4198266)

      Authoring for Flash Player 28 and AIR 28

      • Update application descriptor namespace to 28
      • SWF version should be 39

      System Requirements

      For system requirements of the current release of AIR in production, visithttp://www.adobe.com/products/air/systemreqs/

      About the Beta Channel

      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.