Skip to main content

Setup Remote Configurations

GameAnalytics' Remote Configurations feature offers the ability to set up and tune values in your game's dashboard.
These values can be changed on the whim without needing to release a new version of the game.
The remote configs are a custom set of key-pair values.
Set up your Remote Configurations in the GameAnalytics dashboard.

Check Remote Config Updates in iOS

- (void) onRemoteConfigsUpdated
{
// add your code here
}

[GameAnalytics setRemoteConfigsDelegate:self];

Manual Check for Remote Config Updates

To manually check if Remote Configs are ready (if they have been populated with values from the server) you can use the following method:

if([GameAnalytics isRemoteConfigsReady])
{
// the remote configs is ready, add your code here
}
caution

The isRemoteConfigsReady function will return false if the configs haven't been populated by the server yet.

Retrieve Remote Config Values

After the remote configs have been populated you can retrieve their values by using the following function:

// Without custom default value (using normal default value)
NSString *value = [GameAnalytics getRemoteConfigsValueAsString:@"key"];
// With custom default value
NSString *valueWithCustomDefaultValue = [GameAnalytics getRemoteConfigsValueAsString:@"key" defaultValue:@"myDefaultValue"];
caution

If the specified key is not found in the Remote Configs it will return the default value of either “normal” or “custom” value.

tip

For more information on Remote Configs go here.