We have attempted to keep the required extensions to a minimum, packaging required libraries into the ANEs wherever possible however we still will be left with a couple of ANEs that you will need to add to your application.
Each of the separate components of Firebase will require additional ANEs which will be identified in the individual sections however the following list will be required by any AIR application using Firebase.
The Core ANE is required by this ANE. You must include and package this extension in your application.
The Core ANE doesn't provide any functionality in itself but provides support libraries and frameworks used by our extensions. It also includes some centralised code for some common actions that can cause issues if they are implemented in each individual extension.
You can access this extension here: https://github.com/distriqt/ANE-Core.
The Android Support libraries encompass the Android Support, Android X and common Google libraries.
These libraries are specific to Android. There are no issues including these on all platforms, they are just required for Android.
This extension requires the following extensions:
You can access these extensions here: https://github.com/distriqt/ANE-AndroidSupport.
Note: if you have been using the older
com.distriqt.androidsupport.*(Android Support) extensions you should remove these extensions and replace it with the
androidxextensions listed above. This is the new version of the android support libraries and moving forward all our extensions will require AndroidX.
This ANE requires usage of certain aspects of the Google Play Services client library. The client library is available as a series of ANEs that you add into your applications packaging options. Each separate ANE provides a component from the Play Services client library and are used by different ANEs. These client libraries aren't packaged with this ANE as they are used by multiple ANEs and separating them will avoid conflicts, allowing you to use multiple ANEs in the one application.
This ANE requires the following Google Play Services:
You must include the above native extensions in your application along with this extension, and you need to ensure they are packaged with your application.
You can access the Google Play Services client library extensions here: https://github.com/distriqt/ANE-GooglePlayServices.
Note: The Google Play Services and Android Support ANEs are only required on Android devices. There is no problem packaging these ANEs with all platforms as there are default implementations available which will allow your code to package without errors however if you are only building an iOS application feel free to remove the Google Play Services ANEs from your application.
To use any Firebase functionality you must include the core Firebase libraries and configure your Firebase application. The core libraries are available in the
com.google.firebase.core extension alongside the Google Play Services:
This extension is located separately due to several of our other extensions relying on the Firebase core libraries.
Finally the all important Firebase extension:
You can access all the Firebase extensions here: https://github.com/distriqt/ANE-Firebase
If you are building for Android using the Android resources configuration you should also make sure you
The following should be added to your
extensions node in your application descriptor to identify all the required ANEs in your application:
You must add all of the following Firebase related manifest additions.
Make sure you only have one
<application> node in your manifest additions combining them if you have multiple.
The following shows the complete manifest additions node. You must replace
APPLICATION_PACKAGE with your AIR application's Java package name, something like
Generally this is your AIR application id prefixed by
air. unless you have specified no air flair in your build options.
com.google.firebase.components.ComponentDiscoveryService is particularly important for Firebase configuration.
meta-data tags that are added to this service specify the components that should be initialised by Firebase and you must ensure that you have added the appropriate tags for the services you are using.
Firebase Messaging depends on Analytics so you must at least include the following tags:
Each of the component extensions will outline whether they have additional
meta-data tags to add to the service.
If you have a large application and are supporting Android 4.x then you will need to ensure you enable your application to correctly support MultiDex to allow the application to be broken up into smaller dex packages.
This is enabled by default with releases of AIR v25+, except in the Android 4.x case where you need to change the manifest additions for the application tag to match the following and use the
This will require the addition of the
androidx.multidex extension which contains the
In order for the Firebase system to work well with AIR and other extensions we need to disable the automatic delegate proxy that Firebase implements on iOS. To do so you must add the following to your InfoAdditions:
You may wish to add a minimum iOS version to restrict your application to the minimum Firebase version.