Get the Adobe Experience Platform Mobile SDK
The Adobe Experience Platform SDK is available for Apple iOS (includes iOS, iPadOS, and tvOS) via Cocoapods and Swift Package Manager, and for Google Android via Gradle.
Follow the directions below to include the SDK into your mobile application.
For iOS and Android projects, the recommended approach for integrating the SDK is to use supported dependency and package managers as listed for each platform such as Maven (Android), and Cocoapods or Swift Package Manager (iOS).
The SDK can also be downloaded for iOS and Android projects following the listed methods:
1. For iOS, XCFramework for different SDK extensions are also available for download from corresponding GitHub repositories. For example, Mobile Core and related extensions XCFramework zip file can be found on the GitHub by selecting Releases.
2. For Android, the aar is already available for download from Maven central. For example, Mobile Core extension aar file can be found under the corresponding package by selecting Browse.
- Select the tag property you created earlier in the Data Collection UI.
- In your tag property's details page, Select the Environments tab on the left nav. The Environments tab lists the different environments where you can publish, e.g. Development, Staging, and Production.
- Select the install package icon (under INSTALL column) for the appropriate environment row. You should see a dialog box titled Mobile Install Instructions.
- On the open dialog box, select the appropriate platform tab Android or iOS.
- Copy the necessary dependencies and initialization code from the dialog box to your mobile application project.
Latest version of the Adobe Experience Platform SDKs for Android supports Android 5.0 (API 21) or later.
Adobe Experience Platform SDKs for iOS support iOS 12 or later; requires Swift 5.1 or newer; and Xcode 15.0 or newer.
In order to support the new Apple M1 architecture while maintaining support for existing Intel architecture, the Adobe Experience Platform SDKs are now distributed using XCFrameworks. Please see the current SDK versions for more information on the latest extension versions.
Latest version of the Adobe Experience Platform SDKs for Android supports Android 5.0 (API 21) or later.
Adobe Experience Platform SDKs for iOS support iOS 12 or later; requires Swift 5.1 or newer; and Xcode 15.0 or newer.
In order to support the new Apple M1 architecture while maintaining support for existing Intel architecture, the Adobe Experience Platform SDKs are now distributed using XCFrameworks. Please see the current SDK versions for more information on the latest extension versions.
Installation instructions
If you cannot access the Mobile Install Instructions dialog box in the Data Collection UI, complete the following sections to get the Adobe Experience Platform SDK. If you already completed the steps in the Mobile Install Instructions dialog box, no need to complete these steps.
1. Add dependencies to your project
Each extension needs to be added as a dependency to the mobile application project. The following examples will add the Mobile Core and Profile extensions.
Add the dependencies to build.gradle
for each extension.
Copied to your clipboardimplementation platform('com.adobe.marketing.mobile:sdk-bom:3.+')implementation 'com.adobe.marketing.mobile:userprofile'implementation 'com.adobe.marketing.mobile:core'implementation 'com.adobe.marketing.mobile:identity'implementation 'com.adobe.marketing.mobile:signal'implementation 'com.adobe.marketing.mobile:lifecycle'
Using dynamic dependency versions is not recommended for production apps. Please read the managing Gradle dependencies guide for more information.
Create a Podfile
if you do not already have one:
Copied to your clipboardpod init
Add the dependencies to your Podfile
for each extension.
Copied to your clipboarduse_frameworks!pod 'AEPEdgeConsent', '~> 5.0'pod 'AEPAssurance', '~> 5.0'pod 'AEPEdgeIdentity', '~> 5.0'pod 'AEPEdge', '~> 5.0'pod 'AEPUserProfile', '~> 5.0'pod 'AEPCore', '~> 5.0'pod 'AEPIdentity', '~> 5.0'pod 'AEPSignal', '~> 5.0'pod 'AEPLifecycle', '~> 5.0'
If Cocoapods cannot not find the dependencies, you may need to run this command:
Copied to your clipboardpod repo update
Save the Podfile
and run install:
Copied to your clipboardpod install
Add the dependencies to build.gradle
for each extension.
Copied to your clipboardimplementation platform('com.adobe.marketing.mobile:sdk-bom:3.+')implementation 'com.adobe.marketing.mobile:userprofile'implementation 'com.adobe.marketing.mobile:core'implementation 'com.adobe.marketing.mobile:identity'implementation 'com.adobe.marketing.mobile:signal'implementation 'com.adobe.marketing.mobile:lifecycle'
Using dynamic dependency versions is not recommended for production apps. Please read the managing Gradle dependencies guide for more information.
Create a Podfile
if you do not already have one:
Copied to your clipboardpod init
Add the dependencies to your Podfile
for each extension.
Copied to your clipboarduse_frameworks!pod 'AEPEdgeConsent', '~> 5.0'pod 'AEPAssurance', '~> 5.0'pod 'AEPEdgeIdentity', '~> 5.0'pod 'AEPEdge', '~> 5.0'pod 'AEPUserProfile', '~> 5.0'pod 'AEPCore', '~> 5.0'pod 'AEPIdentity', '~> 5.0'pod 'AEPSignal', '~> 5.0'pod 'AEPLifecycle', '~> 5.0'
If Cocoapods cannot not find the dependencies, you may need to run this command:
Copied to your clipboardpod repo update
Save the Podfile
and run install:
Copied to your clipboardpod install
2. Add initialization code
Next, you'll need to initialize the SDK by registering all the solution extensions added as dependencies to your project with Mobile Core.
Extension registration is mandatory. Attempting to make extension-specific API calls without registering the extension will lead to undefined behavior.
Currently, the Adobe Experience Platform SDKs do not support running under Direct Boot mode on Android devices. For Android applications configured to be run during Direct Boot mode, verify if the user has unlocked the devices by calling UserManager.isUserUnlocked() before initializing the SDK.
There are two ways to achieve this:
a) Using MobileCore.initialize API (Recommended)
This API is available starting from Android BOM version 3.8.0 and iOS version 5.4.0.
The MobileCore.initialize
API provides a simple way to initialize AEP SDK. It automatically registers solution extensions and enables lifecycle tracking, eliminating the need for manual setup. Refer to the API documentation for additional configuration options.
(Android)
Copied to your clipboardimport com.adobe.marketing.mobile.LoggingModeimport com.adobe.marketing.mobile.MobileCore...import android.app.Application...class MainApp : Application() {override fun onCreate() {super.onCreate()MobileCore.setLogLevel(LoggingMode.DEBUG)MobileCore.initialize(this, "<your_environment_file_id>")}}
(Android)
Copied to your clipboardimport com.adobe.marketing.mobile.LoggingMode;import com.adobe.marketing.mobile.MobileCore;...import android.app.Application;...public class MainApp extends Application {@Overridepublic void onCreate(){super.onCreate();MobileCore.setLogLevel(LoggingMode.DEBUG);MobileCore.initialize(this, "<your_environment_file_id>");}}
(iOS)
Copied to your clipboard// AppDelegate.swiftimport AEPCoreimport AEPServices...final class AppDelegate: NSObject, UIApplicationDelegate {func application(_: UIApplication, didFinishLaunchingWithOptions _: [UIApplication.LaunchOptionsKey: Any]? = nil) -> Bool {MobileCore.setLogLevel(.debug)MobileCore.initialize(appId: "ENVIRONMENT_ID")...}}
(iOS)
Copied to your clipboard// AppDelegate.m#import "AppDelegate.h"@import AEPCore;@import AEPServices;...@implementation AppDelegate- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {[AEPMobileCore setLogLevel: AEPLogLevelDebug];[AEPMobileCore initializeWithAppId:@"ENVIRONMENT_ID" completion:^{NSLog(@"AEP Mobile SDK is initialized");}];...return YES;}@end
Copied to your clipboardimport com.adobe.marketing.mobile.LoggingModeimport com.adobe.marketing.mobile.MobileCore...import android.app.Application...class MainApp : Application() {override fun onCreate() {super.onCreate()MobileCore.setLogLevel(LoggingMode.DEBUG)MobileCore.initialize(this, "<your_environment_file_id>")}}
Copied to your clipboardimport com.adobe.marketing.mobile.LoggingMode;import com.adobe.marketing.mobile.MobileCore;...import android.app.Application;...public class MainApp extends Application {@Overridepublic void onCreate(){super.onCreate();MobileCore.setLogLevel(LoggingMode.DEBUG);MobileCore.initialize(this, "<your_environment_file_id>");}}
Copied to your clipboard// AppDelegate.swiftimport AEPCoreimport AEPServices...final class AppDelegate: NSObject, UIApplicationDelegate {func application(_: UIApplication, didFinishLaunchingWithOptions _: [UIApplication.LaunchOptionsKey: Any]? = nil) -> Bool {MobileCore.setLogLevel(.debug)MobileCore.initialize(appId: "ENVIRONMENT_ID")...}}
Copied to your clipboard// AppDelegate.m#import "AppDelegate.h"@import AEPCore;@import AEPServices;...@implementation AppDelegate- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {[AEPMobileCore setLogLevel: AEPLogLevelDebug];[AEPMobileCore initializeWithAppId:@"ENVIRONMENT_ID" completion:^{NSLog(@"AEP Mobile SDK is initialized");}];...return YES;}@end
b) Manual Extension Registration using MobileCore.registerExtensions API
In older SDK versions, solution extensions must be manually imported and registered with MobileCore using the MobileCore.registerExtensions
API.
The following code snippets show how to import and register the Mobile Core and Profile extensions, along with Identity, Lifecycle, Signal, and other extensions for reference.
(Android)
Copied to your clipboardimport com.adobe.marketing.mobile.AdobeCallbackimport com.adobe.marketing.mobile.Assuranceimport com.adobe.marketing.mobile.Edgeimport com.adobe.marketing.mobile.Extensionimport com.adobe.marketing.mobile.Identityimport com.adobe.marketing.mobile.Lifecycleimport com.adobe.marketing.mobile.LoggingModeimport com.adobe.marketing.mobile.MobileCoreimport com.adobe.marketing.mobile.Signalimport com.adobe.marketing.mobile.UserProfileimport com.adobe.marketing.mobile.edge.consent.Consentimport com.adobe.marketing.mobile.edge.identity.Identity as EdgeIdentity...import android.app.Application...class MainApp : Application() {override fun onCreate() {super.onCreate()MobileCore.setApplication(this)MobileCore.setLogLevel(LoggingMode.DEBUG)val extensions: List<Class<out Extension>> = listOf(Consent.EXTENSION,Assurance.EXTENSION,EdgeIdentity.EXTENSION,Identity.EXTENSION,Edge.EXTENSION,UserProfile.EXTENSION,Lifecycle.EXTENSION,Signal.EXTENSION)MobileCore.registerExtensions(extensions) {MobileCore.configureWithAppID("<your_environment_file_id>")}}}
(Android)
Copied to your clipboardimport com.adobe.marketing.mobile.AdobeCallback;import com.adobe.marketing.mobile.Assurance;import com.adobe.marketing.mobile.Edge;import com.adobe.marketing.mobile.Extension;import com.adobe.marketing.mobile.Identity;import com.adobe.marketing.mobile.Lifecycle;import com.adobe.marketing.mobile.LoggingMode;import com.adobe.marketing.mobile.MobileCore;import com.adobe.marketing.mobile.Signal;import com.adobe.marketing.mobile.UserProfile;import com.adobe.marketing.mobile.edge.consent.Consent;import com.adobe.marketing.mobile.edge.identity.Identity;import java.util.Arrays;import java.util.List;...import android.app.Application;...public class MainApp extends Application {@Overridepublic void onCreate(){super.onCreate();MobileCore.setApplication(this);MobileCore.setLogLevel(LoggingMode.DEBUG);List<Class<? extends Extension>> extensions = Arrays.asList(Consent.EXTENSION,Assurance.EXTENSION,com.adobe.marketing.mobile.edge.identity.Identity.EXTENSION,com.adobe.marketing.mobile.Identity.EXTENSION,Edge.EXTENSION,UserProfile.EXTENSION,Lifecycle.EXTENSION,Signal.EXTENSION);MobileCore.registerExtensions(extensions, new AdobeCallback () {@Overridepublic void call(Object o) {MobileCore.configureWithAppID("<your_environment_file_id>");}});}}
(iOS)
Copied to your clipboard// AppDelegate.swiftimport AEPCoreimport AEPEdgeConsentimport AEPAssuranceimport AEPEdgeIdentityimport AEPEdgeimport AEPUserProfileimport AEPIdentityimport AEPLifecycleimport AEPSignalimport AEPServicesfinal class AppDelegate: NSObject, UIApplicationDelegate {func application(_: UIApplication, didFinishLaunchingWithOptions _: [UIApplication.LaunchOptionsKey: Any]? = nil) -> Bool {MobileCore.setLogLevel(.debug)let appState = application.applicationStatelet extensions = [Consent.self,Assurance.self,AEPEdgeIdentity.Identity.self,AEPIdentity.Identity.self,Edge.self,UserProfile.self,Lifecycle.self,Signal.self]MobileCore.registerExtensions(extensions, {MobileCore.configureWith(appId: "<your_environment_file_id>")if appState != .background {MobileCore.lifecycleStart(additionalContextData: ["contextDataKey": "contextDataVal"])}})...}}
(iOS)
Copied to your clipboard// AppDelegate.m#import "AppDelegate.h"@import AEPCore;@import AEPEdgeConsent;@import AEPAssurance;@import AEPEdgeIdentity;@import AEPEdge;@import AEPUserProfile;@import AEPIdentity;@import AEPLifecycle;@import AEPSignal;@import AEPServices;...@implementation AppDelegate- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {[AEPMobileCore setLogLevel: AEPLogLevelDebug];const UIApplicationState appState = application.applicationState;NSArray *extensionsToRegister = @[AEPMobileEdgeConsent.class,AEPMobileAssurance.class,AEPMobileEdgeIdentity.class,AEPMobileEdge.class,AEPMobileUserProfile.class,AEPMobileIdentity.class,AEPMobileLifecycle.class,AEPMobileSignal.class];[AEPMobileCore registerExtensions:extensionsToRegister completion:^{// only start lifecycle if the application is not in the backgroundif (appState != UIApplicationStateBackground) {[AEPMobileCore lifecycleStart:@{@"contextDataKey": @"contextDataVal"}];}}];[AEPMobileCore configureWithAppId: @"<your_environment_file_id>"];...return YES;}@end
Copied to your clipboardimport com.adobe.marketing.mobile.AdobeCallbackimport com.adobe.marketing.mobile.Assuranceimport com.adobe.marketing.mobile.Edgeimport com.adobe.marketing.mobile.Extensionimport com.adobe.marketing.mobile.Identityimport com.adobe.marketing.mobile.Lifecycleimport com.adobe.marketing.mobile.LoggingModeimport com.adobe.marketing.mobile.MobileCoreimport com.adobe.marketing.mobile.Signalimport com.adobe.marketing.mobile.UserProfileimport com.adobe.marketing.mobile.edge.consent.Consentimport com.adobe.marketing.mobile.edge.identity.Identity as EdgeIdentity...import android.app.Application...class MainApp : Application() {override fun onCreate() {super.onCreate()MobileCore.setApplication(this)MobileCore.setLogLevel(LoggingMode.DEBUG)val extensions: List<Class<out Extension>> = listOf(Consent.EXTENSION,Assurance.EXTENSION,EdgeIdentity.EXTENSION,Identity.EXTENSION,Edge.EXTENSION,UserProfile.EXTENSION,Lifecycle.EXTENSION,Signal.EXTENSION)MobileCore.registerExtensions(extensions) {MobileCore.configureWithAppID("<your_environment_file_id>")}}}
Copied to your clipboardimport com.adobe.marketing.mobile.AdobeCallback;import com.adobe.marketing.mobile.Assurance;import com.adobe.marketing.mobile.Edge;import com.adobe.marketing.mobile.Extension;import com.adobe.marketing.mobile.Identity;import com.adobe.marketing.mobile.Lifecycle;import com.adobe.marketing.mobile.LoggingMode;import com.adobe.marketing.mobile.MobileCore;import com.adobe.marketing.mobile.Signal;import com.adobe.marketing.mobile.UserProfile;import com.adobe.marketing.mobile.edge.consent.Consent;import com.adobe.marketing.mobile.edge.identity.Identity;import java.util.Arrays;import java.util.List;...import android.app.Application;...public class MainApp extends Application {@Overridepublic void onCreate(){super.onCreate();MobileCore.setApplication(this);MobileCore.setLogLevel(LoggingMode.DEBUG);List<Class<? extends Extension>> extensions = Arrays.asList(Consent.EXTENSION,Assurance.EXTENSION,com.adobe.marketing.mobile.edge.identity.Identity.EXTENSION,com.adobe.marketing.mobile.Identity.EXTENSION,Edge.EXTENSION,UserProfile.EXTENSION,Lifecycle.EXTENSION,Signal.EXTENSION);MobileCore.registerExtensions(extensions, new AdobeCallback () {@Overridepublic void call(Object o) {MobileCore.configureWithAppID("<your_environment_file_id>");}});}}
Copied to your clipboard// AppDelegate.swiftimport AEPCoreimport AEPEdgeConsentimport AEPAssuranceimport AEPEdgeIdentityimport AEPEdgeimport AEPUserProfileimport AEPIdentityimport AEPLifecycleimport AEPSignalimport AEPServicesfinal class AppDelegate: NSObject, UIApplicationDelegate {func application(_: UIApplication, didFinishLaunchingWithOptions _: [UIApplication.LaunchOptionsKey: Any]? = nil) -> Bool {MobileCore.setLogLevel(.debug)let appState = application.applicationStatelet extensions = [Consent.self,Assurance.self,AEPEdgeIdentity.Identity.self,AEPIdentity.Identity.self,Edge.self,UserProfile.self,Lifecycle.self,Signal.self]MobileCore.registerExtensions(extensions, {MobileCore.configureWith(appId: "<your_environment_file_id>")if appState != .background {MobileCore.lifecycleStart(additionalContextData: ["contextDataKey": "contextDataVal"])}})...}}
Copied to your clipboard// AppDelegate.m#import "AppDelegate.h"@import AEPCore;@import AEPEdgeConsent;@import AEPAssurance;@import AEPEdgeIdentity;@import AEPEdge;@import AEPUserProfile;@import AEPIdentity;@import AEPLifecycle;@import AEPSignal;@import AEPServices;...@implementation AppDelegate- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {[AEPMobileCore setLogLevel: AEPLogLevelDebug];const UIApplicationState appState = application.applicationState;NSArray *extensionsToRegister = @[AEPMobileEdgeConsent.class,AEPMobileAssurance.class,AEPMobileEdgeIdentity.class,AEPMobileEdge.class,AEPMobileUserProfile.class,AEPMobileIdentity.class,AEPMobileLifecycle.class,AEPMobileSignal.class];[AEPMobileCore registerExtensions:extensionsToRegister completion:^{// only start lifecycle if the application is not in the backgroundif (appState != UIApplicationStateBackground) {[AEPMobileCore lifecycleStart:@{@"contextDataKey": @"contextDataVal"}];}}];[AEPMobileCore configureWithAppId: @"<your_environment_file_id>"];...return YES;}@end
3. Ensure app permissions (Android only)
For Android, the SDK requires standard network connection permissions in your manifest to send data, collect cellular provider, and record offline tracking calls.
To enable these permissions, add the following lines to your AndroidManifest.xml
file, located in your app's application project directory:
Copied to your clipboard<uses-permission android:name="android.permission.INTERNET" /><uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
Additional information
- How to use Gradle for Android
- How to use CocoaPods for iOS
- How to use Swift Package Manager for iOS
- Current SDK Versions
Get help
- Visit the SDK community forum to ask questions
- Contact Adobe Experience Cloud customer care for immediate assistance