Edit in GitHubLog an issue

Java

Syntax

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

Example

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

Swift

Syntax

Copied to your clipboard
static func configureWith(appId: String)

Example

Copied to your clipboard
MobileCore.configureWith(appId: "1423ae38-8385-8963-8693-28375403491d")

Objective-C

Syntax

Copied to your clipboard
+ (void) configureWithAppId: (NSString* appId);

Example

Copied to your clipboard
[AEPMobileCore 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.

Java

Syntax

Copied to your clipboard
public static void updateConfiguration(@NonNull 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
@objc(updateConfiguration:)
static func updateConfigurationWith(configDict: [String: Any])

Example

Copied to your clipboard
let updatedConfig = ["global.privacy":"optedout"]
MobileCore.updateConfigurationWith(configDict: updatedConfig)

Objective-C

Syntax

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

Example

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

Java

Syntax

Copied to your clipboard
public static void configureWithFileInPath(@NonNull final String filePath)

Example

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 configureWith(filePath: String)

Example

Copied to your clipboard
let filePath = Bundle.main.path(forResource: "ExampleJSONFile", ofType: "json")
if let filePath = filePath {
MobileCore.configureWith(filePath: filePath)
}

Objective-C

Syntax

Copied to your clipboard
+ (void) configureWithFilePath: (NSString* __nullable) filepath;

Example

Copied to your clipboard
NSString *filePath = [[NSBundle mainBundle] pathForResource:@"ExampleJSONFile" ofType:@"json"];
[AEPMobileCore configureWithFilePath: filePath];
Was this helpful?
  • Privacy
  • Terms of Use
  • Do not sell or share my personal information
  • AdChoices
Copyright © 2025 Adobe. All rights reserved.