Edit in GitHubLog an issue
  1. Add the Mobile Core and Edge extensions to your project using the app's Gradle file.

Kotlin

Copied to your clipboard
implementation(platform("com.adobe.marketing.mobile:sdk-bom:3.+"))
implementation("com.adobe.marketing.mobile:core")
implementation("com.adobe.marketing.mobile:identity")
implementation("com.adobe.marketing.mobile:edge")
implementation("com.adobe.marketing.mobile:edgeidentity")

Groovy

Copied to your clipboard
implementation platform('com.adobe.marketing.mobile:sdk-bom:3.+')
implementation 'com.adobe.marketing.mobile:core'
implementation 'com.adobe.marketing.mobile:identity'
implementation 'com.adobe.marketing.mobile:edge'
implementation 'com.adobe.marketing.mobile:edgeidentity'
  1. Import the Mobile Core and Edge extensions in your application class but do not include the Identity or Identity for Edge Network extensions. Instead, use their fully qualified names during registration and when calling their APIs.
Copied to your clipboard
import com.adobe.marketing.mobile.MobileCore;
import com.adobe.marketing.mobile.Edge;
  1. Add the Mobile Core and Edge extensions to your project using CocoaPods. Add following pods in your Podfile:
Copied to your clipboard
use_frameworks!
target 'YourTargetApp' do
pod 'AEPCore'
pod 'AEPIdentity'
pod 'AEPEdge'
pod 'AEPEdgeIdentity'
end
  1. Import the Mobile Core and Edge libraries:

Swift

Copied to your clipboard
// AppDelegate.swift
import AEPCore
import AEPIdentity
import AEPEdge
import AEPEdgeIdentity

Objective-C

Copied to your clipboard
// AppDelegate.h
@import AEPCore;
@import AEPIdentity;
@import AEPEdge;
@import AEPEdgeIdentity;

Java

Copied to your clipboard
public class MobileApp extends Application {
// Set up the preferred Environment File ID from your mobile property configured in Data Collection UI
private final String ENVIRONMENT_FILE_ID = "";
@Override
public void onCreate() {
super.onCreate();
MobileCore.setApplication(this);
MobileCore.configureWithAppID(ENVIRONMENT_FILE_ID);
// Register Adobe Experience Platform SDK extensions
MobileCore.registerExtensions(
Arrays.asList(
Edge.EXTENSION,
com.adobe.marketing.mobile.edge.identity.Identity.EXTENSION,
com.adobe.marketing.mobile.Identity.EXTENSION
),
o -> Log.debug("MobileApp", "MobileApp", "Adobe Experience Platform Mobile SDK initialized.")
);
}
}

Kotlin

Copied to your clipboard
class MobileApp : Application() {
// Set up the preferred Environment File ID from your mobile property configured in Data Collection UI
private var ENVIRONMENT_FILE_ID: String = ""
override fun onCreate() {
super.onCreate()
MobileCore.setApplication(this)
MobileCore.configureWithAppID(ENVIRONMENT_FILE_ID)
// Register Adobe Experience Platform SDK extensions
MobileCore.registerExtensions(
listOf(
Edge.EXTENSION,
com.adobe.marketing.mobile.edge.identity.Identity.EXTENSION,
com.adobe.marketing.mobile.Identity.EXTENSION
)
) {
Log.debug("MobileApp", "MobileApp", "Adobe Experience Platform Mobile SDK initialized.")
}
}
}

Swift

Copied to your clipboard
// AppDelegate.swift
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
MobileCore.registerExtensions([AEPEdgeIdentity.Identity.self, AEPIdentity.Identity.self, Edge.self], {
MobileCore.configureWith(appId: "yourAppId")
})
...
}

Objective-C

Copied to your clipboard
// AppDelegate.m
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
[AEPMobileCore registerExtensions:@[AEPMobileEdgeIdentity.class, AEPMobileIdentity.class, AEPMobileEdge.class] completion:^{
...
}];
[AEPMobileCore configureWithAppId: @"yourAppId"];
...
}

Java

Copied to your clipboard
MobileCore.setPrivacyStatus(MobilePrivacyStatus.OPT_OUT);
MobileCore.resetIdentities();
com.adobe.marketing.mobile.edge.identity.Identity.getExperienceCloudId(new AdobeCallback<String>() {
@Override
public void call(String s) {
// ignore
}
});
MobileCore.setPrivacyStatus(MobilePrivacyStatus.OPT_IN);

Swift

Copied to your clipboard
MobileCore.setPrivacyStatus(.optedOut)
MobileCore.resetIdentities()
AEPEdgeIdentity.Identity.getExperienceCloudId { _, _ in }
MobileCore.setPrivacyStatus(.optedIn)

Objective-C

Copied to your clipboard
[AEPMobileCore setPrivacyStatus:AEPPrivacyStatusOptedOut];
[AEPMobileCore resetIdentities];
[AEPMobileEdgeIdentity getExperienceCloudId:^(NSString *ecid, NSError *error) {
// ignore
}];
[AEPMobileCore setPrivacyStatus:AEPPrivacyStatusOptedIn];
  • Privacy
  • Terms of Use
  • Do not sell or share my personal information
  • AdChoices
Copyright © 2025 Adobe. All rights reserved.