Firebase Remote Config
Tested with Firebase version 10.29.0 (iOS)
Last updated
Tested with Firebase version 10.29.0 (iOS)
Last updated
Third party remote configuration provider integration is currently in private beta and will be available in the next major release of Appfigurate.
Using Appfigurate remote properties instead of Firebase APIs directly allows for the following:
locally change Firebase remote configuration without affecting your entire customer base.
compile time type safety - Appfigurate remote properties are typed, Firebase remote configuration is not.
avoids hardcoding duplicated flag names throughout your app.
deleting a remote configuration property from Firebase Console won't affect existing apps, they'll continue to use the default value provided in the method.
We assume you already have Appfigurate Library and integrated into your app with the following example remote properties created in the :
Swift Configuration example
Appfigurate Library needs to be able to read the current remote configuration values from Firebase. Copy and paste the following code into your app.
Swift example
Swift example
We need to tell Appfigurate Library that Firebase has received remote configuration, so that it can keep your Configuration subclass remote properties in sync.
Add a call to APLFlushRemoteConfiguration
in any existing Firebase Remote Config activate(completion:)
blocks (inside fetch(completionHandler:)
and optionally addOnConfigUpdateListener(remoteConfigUpdateCompletion:
).
Swift example
Replace all calls to Firebase Remote Config configValue(forKey:)
:
with the following:
Update your configuration subclass to include your remote configuration properties. Provide default values for the properties in the overridden method. See also .
The defaultValue
parameter in the callback is not used with Firebase. See the section below.
Apply default values to Firebase using the values you set in the method of your configuration subclass. The default values are used by Firebase when the remote configuration has not yet been received.
The class has a method remoteDefaults
which provides a Dictionary
of all the remote configuration property default values that were set in your overridden method.
The class has a method remoteDefaults
which provides a NSDictionary*
of all the remote configuration property default values that were set in your overridden method.
The class has a method remoteDefaults
which provides a HashMap<String,Object>
of all the remote configuration property default values that were set in your overridden method.
The class has a method remoteDefaults
which provides a HashMap<String,Object>
of all the remote configuration property default values that were set in your overridden method.