Light Mode

Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
This repository was archived by the owner on Apr 4, 2023. It is now read-only.

Latest commit

History

History
42 lines (35 loc) * 1.57 KB

REMOTECONFIG.md

File metadata and controls

42 lines (35 loc) * 1.57 KB

Enabling Remote Config

Since plugin version 3.2.0 you can retrieve Remote Config properties. This feature lets you configure parameters in your Firebase instance like these:

If you didn't choose this feature during installation you can manually uncomment the relevant lines to add the SDK's to your app in Podfile and include.gradle.

Functions

getRemoteConfig

Using this function you can retrieve the current values of the remote properties so you can change app behavior on the fly easily (feature toggles for instance).

firebase.getRemoteConfig({
developerMode: false, // play with this boolean to get more frequent updates during development
cacheExpirationSeconds: 600, // 10 minutes, default is 12 hours.. set to a lower value during dev
properties: [{
key: "holiday_promo_enabled",
default: false
},
{
key: "coupons_left",
default: 100
},
{
key: "double_or_nothing",
default: 9.99
}]
}).then(
function (result) {
console.log("Remote Config last fetched at " + result.lastFetch);
console.log("Remote Config: " + JSON.stringify(result.properties));
console.log("Remote Config property 'coupons_left': " + result.properties.coupons_left);
}
);