Use the native Firebase SDK in Axway Titanium. This repository is part of the Titanium Firebase project.
- The Firebase Core module
- Titanium SDK 7.0.0+
import TiFirebaseConfig from 'firebase.config';
export default class ConfigManager {
static fetch () {
TiFirebaseConfig.fetch({
callback: event => {
TiFirebaseConfig.activateFetched();
}
});
}
static getString(key) {
const value = TiFirebaseConfig.configValueForKey(key);
if (!value) return undefined;
return value.string;
}
static getBool(key) {
const value = TiFirebaseConfig.configValueForKey(key);
if (!value) return undefined;
return value.bool;
}
static getNumber(key) {
const value = TiFirebaseConfig.configValueForKey(key);
if (!value) return undefined;
return value.number;
}
static getData(key) {
const value = TiFirebaseConfig.configValueForKey(key);
if (!value) return undefined;
return value.data;
}
}parameters(Dictionary)callback(Function)expirationDuration(Number, optional)
key(String)namespace(String, optional)
keyedSubscript(String)
source(SOURCE_)namespace(String, optional)
prefix(String)namespace(String, optional)
defaults(Dictionary)namespace(String, optional)
plistName(Dictionary)namespace(String, optional)
key(String)namespace(String, optional)
cd [ios|android]
appc run -p [ios|android] --build-onlyThis module is Copyright (c) 2017-present by Hans KnΓΆchel. All Rights Reserved.