Java
Syntax
Copied to your clipboardpublic static void configureWithAppID(final String appId);
Example
Copied to your clipboardMobileCore.configureWithAppId("1423ae38-8385-8963-8693-28375403491d");
Swift
Syntax
Copied to your clipboardstatic func configure(withAppId: String)
Example
Copied to your clipboardACPCore.configure(withAppId: "1423ae38-8385-8963-8693-28375403491d")
Objective-C
Syntax
Copied to your clipboard+ (void) configureWithAppId: (NSString* __nullable) appid;
Example
Copied to your clipboard[ACPCore configureWithAppId:@"1423ae38-8385-8963-8693-28375403491d"];
Alternatively, you can also place the environment ID in your iOS project's Info.plist with the ADBMobileAppID
key. When the SDK is initialized, the environment ID is automatically read from the Info.plist file and the associated configuration.
Cordova
When using Cordova, the configureWithAppId
method call must be done in native code which is shown under the Android and iOS tabs.
C#
Syntax
Copied to your clipboardvoid ConfigureWithAppID([NullAllowed] string appid);
Example
Copied to your clipboardACPCore.ConfigureWithAppID("1423ae38-8385-8963-8693-28375403491d");
C#
Syntax
Copied to your clipboardpublic static void ConfigureWithAppID(string appId);
Example
Copied to your clipboardACPCore.ConfigureWithAppID("1423ae38-8385-8963-8693-28375403491d");
Java
Syntax
Copied to your clipboardpublic static void updateConfiguration(final Map<String, Object> configMap);
Example
Copied to your clipboardHashMap<String, Object> data = new HashMap<String, Object>();data.put("global.privacy", "optedout");MobileCore.updateConfiguration(data);
Swift
Syntax
Copied to your clipboardstatic func updateConfiguration(_: [String: Any])
Example
Copied to your clipboardlet updatedConfig = ["global.privacy":"optedout"]ACPCore.updateConfiguration(updatedConfig)
Objective-C
Syntax
Copied to your clipboard+ (void) updateConfiguration: (NSDictionary* __nullable) config;
Example
Copied to your clipboardNSDictionary *updatedConfig = @{@"global.privacy":@"optedout"};[ACPCore updateConfiguration:updatedConfig];
JavaScript
Syntax
Copied to your clipboardupdateConfiguration(configMap?: { string: any })
Example
Copied to your clipboardACPCore.updateConfiguration({"global.privacy":"optedout"});
Dart
Syntax
Copied to your clipboardstatic Future<void> updateConfiguration(Map<String, Object> configMap);
Example
Copied to your clipboardFlutterACPCore.updateConfiguration({"global.privacy":"optedout"});
Cordova
Example
Copied to your clipboardACPCore.updateConfiguration({"global.privacy":"optedout"}, function(handleCallback) {console.log("AdobeExperenceSDK: Update configuration successful: " + handleCallback);}, function(handleError) {console.log("AdobeExperenceSDK: Failed to update configuration : " + handleError);});
C#
Syntax
Copied to your clipboardpublic static void UpdateConfiguration(Dictionary<string, object> config);
Example
Copied to your clipboardvar dict = new Dictionary<string, object>();dict.Add("global.privacy", "optedout");ACPCore.UpdateConfiguration(dict);
C#
Syntax
Copied to your clipboardvoid UpdateConfiguration([NullAllowed] NSDictionary config);
iOS example
Copied to your clipboardvar config = new NSMutableDictionary<NSString, NSObject>{["global.privacy"] = new NSString("optedout")};ACPCore.UpdateConfiguration(config);
Android example
Copied to your clipboardvar config = new Dictionary<string, Java.Lang.Object>();config.Add("global.privacy", "optedout");ACPCore.UpdateConfiguration(config);
Java
Copied to your clipboard// Case 1: to use ADBMobileConfig.json in the assets folder// No code is needed// Case 2: to use a config json from a absolute path:MobileCore.configureWithFileInPath("absolute/path/to/exampleJSONfile.json");// Case 3: to use a config json in Assets folderMobileCore.configureWithFileInAssets("exampleJSONfile.json");
Swift
Syntax
Copied to your clipboardstatic func configureWithFile(inPath: String)
Example
Copied to your clipboardlet filePath = Bundle.main.path(forResource: "ExampleJSONFile", ofType: "json")ACPCore.configureWithFile(inPath: filePath)
Objective-C
Syntax
Copied to your clipboard+ (void) configureWithFileInPath: (NSString* __nullable) filepath;
Example
Copied to your clipboardNSString *filePath = [[NSBundle mainBundle] pathForResource:@"ExampleJSONFile"ofType:@"json"];[ACPCore configureWithFileInPath:filePath];
C#
Syntax
Copied to your clipboardvoid ConfigureWithFileInPath([NullAllowed] string filepath);
Example
Copied to your clipboardACPCore.ConfigureWithFileInPath("absolute/path/to/exampleJSONfile.json");