This API causes the SDK to download the configuration for the provided app ID and apply the configuration to the current session.
You can also update the configuration programmatically by passing configuration keys and values to override the existing configuration.
Keys that are not found on the current configuration are added when this method is followed. Null values are allowed and replace existing configuration values.
Do not use this API to update the build.environment
key or any key with an environment prefix, because it can lead to unexpected behaviors. For more information, read Environment-aware configuration properties.
+ (void) updateConfiguration: (NSDictionary* __nullable) config;
NSDictionary *updatedConfig = @{@"global.privacy":@"optedout"};[ACPCore updateConfiguration:updatedConfig];
let updatedConfig = ["global.privacy":"optedout"]ACPCore.updateConfiguration(updatedConfig)
Update SDK configuration
iOS
var config = new NSMutableDictionary<NSString, NSObject>{["newConfigKey"] = new NSString("newConfigValue")};ACPCore.UpdateConfiguration(config);
Android
var config = new Dictionary<string, Java.Lang.Object>();config.Add("newConfigKey", "newConfigValue");ACPCore.UpdateConfiguration(config);
You can include a bundled JSON configuration file in your app package to replace or complement the configuration that was downloaded by using the Configure with Launch App ID approach.
To pass in a bundled path and file name:
+ (void) configureWithFileInPath: (NSString* __nullable) filepath;
Objective-C
NSString *filePath = [[NSBundle mainBundle] pathForResource:@"ExampleJSONFile"ofType:@"json"];[ACPCore configureWithFileInPath:filePath];
Swift
let filePath = Bundle.main.path(forResource: "ExampleJSONFile", ofType: "json")ACPCore.configureWithFile(inPath: filePath)