Other third party remote configuration providers
Check your third party remote configuration provider APIs for compatibility
The third party remote configuration providers' read-property function(s) must return a value synchronously (cached or default value):
✓ Pseudocode examples - ok
// ok - returns value immediately
var value = thirdPartyRemoteProvider.getBooleanValue("alwaysDarkMode");
// ok - returns value immediately
var value = thirdPartyRemoteProvider.getBooleanValue("alwaysDarkMode", false);If your third party remote configuration provider's read-property function(s) are marked async, or take a callback/lambda/delegate, then it is incompatible with Appfigurate Library:
✗ Pseudocode examples - incompatible third party remote provider
// not compatible - asynchronous
var value = await thirdPartyRemoteProvider.getBooleanValue("alwaysDarkMode");
// not compatible - callback
thirdPartyRemoteProvider.getBooleanValue("alwaysDarkMode") { value in
...
};Also check if your third party remote configuration provider has `snapshot` APIs, which should allow synchronous access to a 'snapshot in time' of remote properties (e.g. ConfigCat).
Once you've confirmed your third party remote provider has the required synchronous read-property function(s), you can start integration.
Integration of third party remote configuration providers
Using Appfigurate remote properties instead of your third party remote configuration provider APIs directly allows for the following:
locally change third party remote configuration provider properties without affecting your entire customer base.
compile time type safety - Appfigurate remote properties are typed, third party remote configuration provider properties are not.
avoids hardcoding duplicated property names throughout your app.
avoids hardcoding duplicated default values throughout your app.
deleting a property from your third party remote configuration provider Console won't affect existing apps, they'll continue to use the default value provided in the
resetmethod.
We assume you already have Appfigurate Library and your third party remote provider integrated into your app with the following example remote properties created in the third party remote provider's Console:
alwaysDarkMode
boolean
appTitle
string
bookingDuration
integer
fontSize
double
Add remote properties into your Configuration subclass
Update your configuration subclass to include your remote configuration properties. Provide default values for the properties in the overridden reset method. See also Supported property types.
Swift Configuration example
Objective-C Configuration header example
Objective-C Configuration implementation example
Kotlin Configuration example
Java Configuration example
Provide remote configuration values to Appfigurate Library when requested
Appfigurate Library needs to be able to read the current remote configuration values from your third party remote configuration provider.
If your third party remote configuration provider's read-property function(s) have a default value parameter, then Appfigurate Library passes across the correct default value of the remote property to the callback:
Pseudocode example
If your third party remote configuration provider's read-property function(s) doesn't have a default value parameter, then it will likely require default values to be set at the start of your app. (e.g. Firebase does, Launch Darkly doesn't).
We recommend you use the default values set in the reset method of your configuration subclass. You can get the default values using the remoteDefaults method, which returns a Dictionary of property key/value pairs:
Pseudocode example
Notify Appfigurate Library when the third party remote configuration provider has received remote config
We need to tell Appfigurate Library that third party remote configuration provider has received remote configuration, so that it can keep your Configuration subclass remote properties in sync.
Pseudocode example
Best practice and usage
Replace all calls to your third party remote configuration providers read-property function(s):
Pseudocode example
with the following:
Pseudocode example
Last updated