Edit in GitHubLog an issue

Java

Syntax

Copied to your clipboard
public static void configureWithAppID(final String appId);

Example

Copied to your clipboard
MobileCore.configureWithAppId("1423ae38-8385-8963-8693-28375403491d");

Swift

Syntax

Copied to your clipboard
static func configure(withAppId: String)

Example

Copied to your clipboard
ACPCore.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 clipboard
void ConfigureWithAppID([NullAllowed] string appid);

Example

Copied to your clipboard
ACPCore.ConfigureWithAppID("1423ae38-8385-8963-8693-28375403491d");

C#

Syntax

Copied to your clipboard
public static void ConfigureWithAppID(string appId);

Example

Copied to your clipboard
ACPCore.ConfigureWithAppID("1423ae38-8385-8963-8693-28375403491d");

Java

Syntax

Copied to your clipboard
public static void updateConfiguration(final Map<String, Object> configMap);

Example

Copied to your clipboard
HashMap<String, Object> data = new HashMap<String, Object>();
data.put("global.privacy", "optedout");
MobileCore.updateConfiguration(data);

Swift

Syntax

Copied to your clipboard
static func updateConfiguration(_: [String: Any])

Example

Copied to your clipboard
let updatedConfig = ["global.privacy":"optedout"]
ACPCore.updateConfiguration(updatedConfig)

Objective-C

Syntax

Copied to your clipboard
+ (void) updateConfiguration: (NSDictionary* __nullable) config;

Example

Copied to your clipboard
NSDictionary *updatedConfig = @{@"global.privacy":@"optedout"};
[ACPCore updateConfiguration:updatedConfig];

JavaScript

Syntax

Copied to your clipboard
updateConfiguration(configMap?: { string: any })

Example

Copied to your clipboard
ACPCore.updateConfiguration({"global.privacy":"optedout"});

Dart

Syntax

Copied to your clipboard
static Future<void> updateConfiguration(Map<String, Object> configMap);

Example

Copied to your clipboard
FlutterACPCore.updateConfiguration({"global.privacy":"optedout"});

Cordova

Example

Copied to your clipboard
ACPCore.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 clipboard
public static void UpdateConfiguration(Dictionary<string, object> config);

Example

Copied to your clipboard
var dict = new Dictionary<string, object>();
dict.Add("global.privacy", "optedout");
ACPCore.UpdateConfiguration(dict);

C#

Syntax

Copied to your clipboard
void UpdateConfiguration([NullAllowed] NSDictionary config);

iOS example

Copied to your clipboard
var config = new NSMutableDictionary<NSString, NSObject>
{
["global.privacy"] = new NSString("optedout")
};
ACPCore.UpdateConfiguration(config);

Android example

Copied to your clipboard
var 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 folder
MobileCore.configureWithFileInAssets("exampleJSONfile.json");

Swift

Syntax

Copied to your clipboard
static func configureWithFile(inPath: String)

Example

Copied to your clipboard
let 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 clipboard
NSString *filePath = [[NSBundle mainBundle] pathForResource:@"ExampleJSONFile"ofType:@"json"];
[ACPCore configureWithFileInPath:filePath];

C#

Syntax

Copied to your clipboard
void ConfigureWithFileInPath([NullAllowed] string filepath);

Example

Copied to your clipboard
ACPCore.ConfigureWithFileInPath("absolute/path/to/exampleJSONfile.json");
Was this helpful?
  • Privacy
  • Terms of Use
  • Do not sell or share my personal information
  • AdChoices
Copyright © 2024 Adobe. All rights reserved.