The tabris-plugin-firebase
plugin provides a Tabris.js API to interact with various firebase features. The plugin supports firebase cloud messaging and firebase analytics with support for more features underway.
The Tabris.js website provides detailed information on how to integrate custom plugins in your Tabris.js app.
The plugin should be added as an entry in the apps config.xml
file:
<!-- Not yet on npm -->
<plugin name="tabris-plugin-firebase" spec="3.x" />
To fetch the latest development version use the GitHub url:
<plugin name="tabris-plugin-firebase" spec="https://github.com/eclipsesource/tabris-plugin-firebase.git" />
To enable firebase support in your app, we have to provide the credential files for Android and iOS. The files can be obtained from the firebase console.
For Android we have to include the google-services.json
file. To make it available to the tabris-plugins-firebase
you have to place it in the same folder as your apps config.xml
file. If the file is missing the plugin will print an appropriate error message.
For iOS we have to include the GoogleService-Info.plist
file. To make it available to the tabris-plugins-firebase
you have to place it in the same folder as your apps config.xml
file.
In addition you have to include GoogleService-Info.plist
file as a resource-file
in the config.xml
:
<platform name="ios">
<resource-file src="GoogleService-Info.plist" />
</platform>
The Tabris.js firebase plugin supports the following features:
Feature | Supported platforms |
---|---|
Firebase Cloud Messaging | Android, iOS |
Firebase Analytics | Android, iOS |
Compatible with Tabris.js 3.2.
While not required by the consumer of the plugin, this repository provides Android specific development artifacts. These artifacts allow to more easily consume the native source code when developing the native parts of the plugin.
The project provides a gradle based build configuration, which also allows to import the project into Android Studio.
In order to reference the Tabris.js specific APIs, the environment variable TABRIS_ANDROID_PLATFORM
has to point to the Tabris.js Android Cordova platform root directory.
export TABRIS_ANDROID_PLATFORM=/home/user/tabris-android
The environment variable is consumed in the gradle projects build.gradle file.
Published under the terms of the BSD 3-Clause License.