Use the native Firebase SDK in Axway Titanium. This repository is part of the Titanium Firebase project.
- Titanium SDK 6.2.0 or later
When being using used together with other modules that use the Google Play Services (e.g. Ti.Map or Ti.Admob) you have to use at least Titanium SDK 7.0.0 for Android which resolved duplicate dependencies for you.
Latest module versions that support 7.0.0 and have Ti.PlayServices included:
name
(String)parameters
(Dictionary)
parameters
(Dictionary)value
(String)name
(String)
parameters
(Dictionary)screenName
(String)screenClass
(String)
// Require the Firebase Core module (own project!)
var FirebaseCore = require('firebase.core');
// Require the Firebase Analytics module
var FirebaseAnalytics = require('firebase.analytics');
// Configure Firebase
FirebaseCore.configure();
// Get the App Instance ID
Ti.API.info('App Instance ID: ' + FirebaseAnalytics.appInstanceID);
// Log to the Firebase console
FirebaseAnalytics.log('My Event', { /* Optional arguments */ });
// Set user-property string
FirebaseAnalytics.setUserPropertyString({
name: 'My Name'
value: 'My Value'
});
// Set User-ID
FirebaseAnalytics.userID = 'MyUserID';
// Set screen-name and screen-class
FirebaseAnalytics.setScreenNameAndScreenClass({
screenName: 'ScreenName',
screenClass: 'ScreenClass'
});
// Toogle analytics on/off (default: on / true)
FirebaseAnalytics.enabled = false;
cd ios
appc ti build -p ios --build-only
This module is Copyright (c) 2017-Present by Appcelerator, Inc. All Rights Reserved. Usage of this module is subject to the Terms of Service agreement with Appcelerator, Inc.