Get the Experience Platform SDK
The Adobe Experience Platform SDK is available for Apple iOS (includes iOS, iPadOS, and tvOS) via Cocoapods, for Google Android via Gradle, and for various cross-platform platforms such as Cordova, Flutter, React Native, Unity, and Xamarin.
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 and Cocoapods. SDKs are also available for download on GitHub.
Android
iOS (AEP 3.x)
iOS (ACP 2.x)
React Native
Flutter
Cordova
Unity
Xamarin

Java / Kotlin

Adobe Experience Platform SDKs for Android supports Android 4.0 (API 14) or later.
    1.
    Open the mobile property you created earlier in Experience Platform Launch.
    2.
    On your mobile property's details page, click on the Environments tab.
    The Environments tab lists the different environments where you can publish.
    3.
    In the row for the Development environment, click on the install package icon (
    ).
    You should see a dialog box similar to the following:
    4.
    On the Mobile Install Instructions dialog box, make sure you are on the Android tab.
    5.
    Follow the instructions for using Gradle with Android.
    The necessary dependencies and initialization code can be copied from the dialog box to your mobile application project.
Adobe Experience Platform SDKs for iOS support iOS 10 or later; **requires Swift 5.1 or newer; and Xcode 11.0 or newer**.

Apple M1 compatibility

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 release notes and the document on current SDK versions for more information on the latest extension versions.

iOS (Swift) version 3.x

Add the dependencies to your Podfile for each extension. For a complete list of available SDK extension libraries, please read the documentation on current SDK Versions.
1
use_frameworks!
2
target 'YourTargetApp' do
3
// Mobile Core and dependents
4
pod 'AEPCore'
5
pod 'AEPSignal'
6
pod 'AEPLifecycle'
7
8
// Client-side user profile
9
pod 'AEPUserProfile'
10
11
// Edge Network and dependents
12
pod 'AEPEdge'
13
pod 'AEPEdgeIdentity'
14
pod 'AEPEdgeConsent'
15
16
// Adobe Analytics and dependents
17
pod 'AEPIdentity'
18
pod 'AEPAnalytics'
19
end
Copied!
Adobe Experience Platform SDKs for iOS support iOS 10 or later; **requires Swift 5.1 or newer; and Xcode 11.0 or newer**.

Apple M1 compatibility

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 release notes and the document on current SDK versions for more information on the latest extension versions.
    1.
    Open a previously created and configured Mobile property in Launch, and click on the Environments tab, and then click on the install package icon (
    ).
    2.
    On the Mobile Install Instructions dialog box, select iOS.
    3.
    Follow the instructions for using CocoaPods with iOS.
    4.
    Under the initialization code, choose Objective C or Swift.
The necessary dependencies and initialization code can be copied from the dialog box to your app project.
You should see a pop-up similar to the following image:

React Native

Adobe Experience Platform Mobile SDK plugin for React Native supports React Native version 0.60.0 or later. For the latest installation instructions, see the README file in the react-native-acpcore repository.
For React Native, you should install Node.js to download packages from npm. For additional instructions, see this tutorial on getting started with React Native applications.
v2.0.0 and above of the AEP Mobile SDK React Native plugins use autolinking, which links plugins' native dependencies automatically. For iOS development, after installing the plugins from npm, download the pod dependencies by running the following command:
cd ios && pod install && cd ..
To update native dependencies to latest available versions, run the following command:
cd ios && pod update && cd ..

Flutter

Adobe Experience Platform Mobile SDK plugin for Flutter supports Flutter versions 1.10.0 or later.
For the latest Flutter installation instructions, see the package install tab.

Cordova

Adobe Experience Platform Mobile SDK plugins for Cordova supports Cordova versions 9.0.0 or later. For the latest Cordova installation instructions, see the README file in the cordova-acpcore repository.
For Cordova, you should install Node.js to download packages from npm. For additional instructions, see this guide to get started with Cordova applications.
With Node.js installed, you can install the Cordova framework from terminal using the following statement:
1
sudo npm install -g cordova
Copied!
To start using the Adobe Experience Platform Mobile SDK plugin for Cordova, navigate to the directory of your Cordova app and install the plugins using the following statement:
1
cordova plugin add https://github.com/adobe/cordova-acpcore.git
Copied!

Unity

Adobe Experience Platform SDKs plugins for Unity supports Unity versions 2019.3.10f1 or later
For the latest Unity installation instructions, see the README file in the unity-acpcore repository.
To start using the Adobe Experience Platform Mobile SDK for Unity, open your application and import the requisite Unity packages.
For instance, to add the Mobile Core extension, you should:
    Unzip ACPCore-0.0.1-Unity.zip
    Import ACPCore.unitypackage via Assets-Import Package

Xamarin

Adobe Experience Platform Mobile SDK plugins for Xamarin require MonoAndroid 9.0+ and Xamarin.iOS 1.0+. For the latest Xamarin installation instructions, see the README file in the xamarin-acpcore repository.
The Adobe Experience Platform Mobile SDK plugins for Xamarin are packages distributed via nuget. NuGet packages can be added to projects within a Visual Studio solution. The NuGet packages can also be generated locally via the included Makefile located in each of the Xamarin repositories.

Installation instructions

If you cannot access the Mobile Install Instructions dialog box in Experience Platform Launch, 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.
Android
iOS (AEP 3.x)
iOS (ACP 2.x)
Android
Add the dependencies to build.gradle for each extension.
1
implementation 'com.adobe.marketing.mobile:userprofile:1.+'
2
implementation 'com.adobe.marketing.mobile:sdk-core:1.+'
Copied!
Create a Podfile if you do not already have one:
1
pod init
Copied!
Add the dependencies to your Podfile for each extension.
1
use_frameworks!
2
pod 'AEPCore', '~> 1.0'
3
pod 'AEPUserProfile', '~> 1.0'
Copied!
If Cocoapods cannot not find the dependencies, you may need to run this command:
1
pod repo update
Copied!
Save the Podfile and run install:
1
pod install
Copied!
Create a Podfile if you do not already have one:
1
pod init
Copied!
Add the dependencies to your Podfile for each extension.
1
use_frameworks!
2
pod 'ACPCore', '~> 2.0'
3
pod 'ACPUserProfile', '~> 2.0'
Copied!
If Cocoapods cannot not find the dependencies, you may need to run this command:
1
pod repo update
Copied!
Save the Podfile and run install:
1
pod install
Copied!

2. Add initialization code

Next you'll need to import SDK libraries into your project and register them for initialization. Extensions are registered with Mobile Core so that they can dispatch and listen for events.
Extension registration is mandatory. Attempting to make extension-specific API calls without registering the extension will lead to undefined behavior.
The following code snippets demonstrate how you can import and register the Mobile Core and Profile extensions. You can also see, for reference, how Identity, Lifecycle, Signal, Profile, and other extensions are imported and registered.
Android
iOS (AEP 3.x)
iOS (ACP 2.x)
React Native
Flutter
Cordova
Unity
Xamarin
After you register the extensions, call the start API in Mobile Core to initialize the SDK as shown below. This step is required to boot up the SDK for event processing. The following code snippet is provided as a sample reference.

Java

1
import com.adobe.marketing.mobile.AdobeCallback;
2
import com.adobe.marketing.mobile.Identity;
3
import com.adobe.marketing.mobile.InvalidInitException;
4
import com.adobe.marketing.mobile.Lifecycle;
5
import com.adobe.marketing.mobile.LoggingMode;
6
import com.adobe.marketing.mobile.MobileCore;
7
import com.adobe.marketing.mobile.Signal;
8
import com.adobe.marketing.mobile.UserProfile;
9
...
10
import android.app.Application;
11
...
12
public class MainApp extends Application {
13
...
14
@Override
15
public void on Create(){
16
super.onCreate();
17
MobileCore.setApplication(this);
18
MobileCore.setLogLevel(LoggingMode.DEBUG);
19
...
20
try {
21
UserProfile.registerExtension();
22
Identity.registerExtension();
23
Lifecycle.registerExtension();
24
Signal.registerExtension();
25
MobileCore.start(new AdobeCallback () {
26
@Override
27
public void call(Object o) {
28
MobileCore.configureWithAppID("<your_environment_id_from_Launch>");
29
}
30
});
31
} catch (InvalidInitException e) {
32
...
33
}
34
}
35
}
Copied!
For iOS Swift libraries, registration is changed to a single API call (as shown in the snippets below). Calling theMobileCore.start API is no longer required.
Swift
1
// AppDelegate.swift
2
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
3
MobileCore.registerExtensions([Signal.self, Lifecycle.self, UserProfile.self, Edge.self, AEPEdgeIdentity.Identity.self, Consent.self, AEPIdentity.Identity.self, Analytics.self], {
4
MobileCore.configureWith(appId: "yourLaunchEnvironmentID")
5
})
6
...
7
}
Copied!
Objective-C
1
// AppDelegate.m
2
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
3
[AEPMobileCore registerExtensions:@[AEPMobileSignal.class, AEPMobileLifecycle.class, AEPMobileUserProfile.class, AEPMobileEdge.class, AEPMobileEdgeIdentity.class, AEPMobileEdgeConsent.class, AEPMobileIdentity.class, AEPMobileAnalytics.class] completion:^{
4
[AEPMobileCore configureWithAppId: @"yourLaunchEnvironmentID"];
5
}];
6
...
7
}
Copied!
The following snippet shows an example of how to add the initialization code. Note that this may need to be adjusted, depending on how your application is structured.
Objective-C
1
#import "AppDelegate.h"
2
#import "ACPCore.h"
3
#import "ACPUserProfile.h"
4
#import "ACPIdentity.h"
5
#import "ACPLifecycle.h"
6
#import "ACPSignal.h"
7
...
8
@implementation AppDelegate
9
-(BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
10
[ACPCore setLogLevel:ACPMobileLogLevelDebug];
11
[ACPCore configureWithAppId:@"<your_environment_id_from_Launch>"];
12
...
13
[ACPUserProfile registerExtension];
14
[ACPIdentity registerExtension];
15
[ACPLifecycle registerExtension];
16
[ACPSignal registerExtension];
17
const UIApplicationState appState = application.applicationState;
18
[ACPCore start:^{
19
// only start lifecycle if the application is not in the background
20
if (appState != UIApplicationStateBackground) {
21
[ACPCore lifecycleStart:nil];
22
}
23
}];
24
...
25
return YES;
26
}
27
28
@end
Copied!
Swift
1
import ACPCore
2
import ACPUserProfile
3
...
4
@UIApplicationMain
5
class AppDelegate: UIResponder, UIApplicationDelegate {
6
var window: UIWindow?
7
func application(_application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool{
8
ACPCore.setLogLevel(.debug)
9
ACPCore.configure(withAppId: "<your_environment_id_from_Launch>")
10
...
11
ACPUserProfile.registerExtension()
12
ACPIdentity.registerExtension()
13
ACPLifecycle.registerExtension()
14
ACPSignal.registerExtension()
15
ACPCore.start {
16
ACPCore.lifecycleStart(nil)
17
}
18
...
19
return true
20
}
21
}
Copied!
For React Native apps, initialize the SDK using native code in your AppDelegate (iOS) and MainApplication (Android).

iOS

1
#import "ACPCore.h"
2
#import "ACPUserProfile.h"
3
#import "ACPIdentity.h"
4
#import "ACPLifecycle.h"
5
#import "ACPSignal.h"
6
...
7
@implementation AppDelegate
8
-(BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
9
[ACPCore setLogLevel:ACPMobileLogLevelDebug];
10
[ACPCore configureWithAppId:@"<your_environment_id_from_Launch>"];
11
[ACPUserProfile registerExtension];
12
[ACPIdentity registerExtension];
13
[ACPLifecycle registerExtension];
14
[ACPSignal registerExtension];
15
16
const UIApplicationState appState = application.applicationState;
17
[ACPCore start:^{
18
// only start lifecycle if the application is not in the background
19
if (appState != UIApplicationStateBackground) {
20
[ACPCore lifecycleStart:nil];
21
}
22
}];
23
...
24
return YES;
25
}
26
27
@end
Copied!

Android

1
import com.adobe.marketing.mobile.AdobeCallback;
2
import com.adobe.marketing.mobile.Identity;
3
import com.adobe.marketing.mobile.InvalidInitException;
4
import com.adobe.marketing.mobile.Lifecycle;
5
import com.adobe.marketing.mobile.LoggingMode;
6
import com.adobe.marketing.mobile.MobileCore;
7
import com.adobe.marketing.mobile.Signal;
8
import com.adobe.marketing.mobile.UserProfile;
9
...
10
import android.app.Application;
11
...
12
public class MainApplication extends Application implements ReactApplication {
13
...
14
@Override
15
public void on Create(){
16
super.onCreate();
17
...
18
MobileCore.setApplication(this);
19
MobileCore.setLogLevel(LoggingMode.DEBUG);
20
MobileCore.setWrapperType(WrapperType.REACT_NATIVE);
21
22
try {
23
UserProfile.registerExtension();
24
Identity.registerExtension();
25
Lifecycle.registerExtension();
26
Signal.registerExtension();
27
MobileCore.start(new AdobeCallback () {
28
@Override
29
public void call(Object o) {
30
MobileCore.configureWithAppID("<your_environment_id_from_Launch>");
31
}
32
});
33
} catch (InvalidInitException e) {
34
...
35
}
36
}
37
}
Copied!

Dart

For Flutter apps, initialize the SDK using native code in your AppDelegate and MainApplication in iOS and Android, respectively.
The initialization code is located in the Flutter ACPCore Github README.
For Cordova apps, initialize the SDK using native code in your AppDelegate and MainApplication in iOS and Android, respectively.
iOS
1
// Import the SDK
2
#import "ACPCore.h"
3
#import "ACPLifecycle.h"
4
#import "ACPIdentity.h"
5
#import "ACPSignal.h"
6
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
7
// make sure to set the wrapper type at the beginning of initialization
8
[ACPCore setWrapperType:ACPMobileWrapperTypeCordova];
9
10
//...
11
[ACPCore configureWithAppId:@"yourAppId"];
12
[ACPIdentity registerExtension];
13
[ACPLifecycle registerExtension];
14
[ACPSignal registerExtension];
15
// Register any additional extensions
16
17
[ACPCore start:nil];
18
}
Copied!
Android
1
// Import the SDK
2
import com.adobe.marketing.mobile.MobileCore;
3
import com.adobe.marketing.mobile.Identity;
4
import com.adobe.marketing.mobile.Lifecycle;
5
import com.adobe.marketing.mobile.Signal;
6
import com.adobe.marketing.mobile.WrapperType;
7
8
@Override
9
public void onCreate() {
10
//...
11
MobileCore.setApplication(this);
12
MobileCore.configureWithAppID("yourAppId");
13
14
// make sure to set the wrapper type at the beginning of initialization
15
MobileCore.setWrapperType(WrapperType.CORDOVA);
16
17
try {
18
Identity.registerExtension();
19
Lifecycle.registerExtension();
20
Signal.registerExtension();
21
22
// Register any additional extensions
23
} catch (Exception e) {
24
// handle exception
25
}
26
27
MobileCore.start(null);
28
}
Copied!

C#

For Unity apps, initialize the SDK using the following code in the start function of the MainScript.
1
using com.adobe.marketing.mobile;
2
using using AOT;
3
4
public class MainScript : MonoBehaviour
5
{
6
[MonoPInvokeCallback(typeof(AdobeStartCallback))]
7
public static void HandleStartAdobeCallback()
8
{
9
ACPCore.ConfigureWithAppID("1423ae38-8385-8963-8693-28375403491d");
10
}
11
12
// Start is called before the first frame update
13
void Start()
14
{
15
if (Application.platform == RuntimePlatform.Android) {
16
ACPCore.SetApplication();
17
}
18
19
ACPCore.SetLogLevel(ACPCore.ACPMobileLogLevel.VERBOSE);
20
ACPCore.SetWrapperType();
21
ACPIdentity.registerExtension();
22
ACPLifecycle.registerExtension();
23
ACPSignal.registerExtension();
24
ACPCore.Start(HandleStartAdobeCallback);
25
}
26
}
Copied!

C#

For Xamarin Forms applications, the SDK initialization differs, depending on the platform being targeted.
iOS
1
using Com.Adobe.Marketing.Mobile;
2
3
[Register("AppDelegate")]
4
public partial class AppDelegate : global::Xamarin.Forms.Platform.iOS.FormsApplicationDelegate
5
{
6
//
7
// This method is invoked when the application has loaded and is ready to run. In this
8
// method you should instantiate the window, load the UI into it and then make the window
9
// visible.
10
//
11
// You have 17 seconds to return from this method, or iOS will terminate your application.
12
//
13
public override bool FinishedLaunching(UIApplication app, NSDictionary options)
14
{
15
global::Xamarin.Forms.Forms.Init();
16
LoadApplication(new App());
17
18
// set the wrapper type
19
ACPCore.SetWrapperType(ACPMobileWrapperType.Xamarin);
20
21
// set launch config
22
ACPCore.ConfigureWithAppID("your-app-id");
23
24
// register SDK extensions
25
ACPIdentity.RegisterExtension();
26
ACPLifecycle.RegisterExtension();
27
ACPSignal.RegisterExtension();
28
29
// start core
30
ACPCore.Start(null);
31
}
Copied!
Android
1
using Com.Adobe.Marketing.Mobile;
2
3
[Activity(Label = "TestApp", Icon = "@mipmap/icon", Theme = "@style/MainTheme", MainLauncher = true, ConfigurationChanges = ConfigChanges.ScreenSize | ConfigChanges.Orientation)]
4
public class MainActivity : global::Xamarin.Forms.Platform.Android.FormsAppCompatActivity
5
{
6
protected override void OnCreate(Bundle savedInstanceState)
7
{
8
base.OnCreate(savedInstanceState);
9
10
global::Xamarin.Forms.Forms.Init(this, savedInstanceState);
11
LoadApplication(new App());
12
13
// set the wrapper type
14
ACPCore.SetWrapperType(WrapperType.Xamarin);
15
16
// register SDK extensions
17
ACPCore.Application = this.Application;
18
ACPIdentity.RegisterExtension();
19
ACPLifecycle.RegisterExtension();
20
ACPSignal.RegisterExtension();
21
22
// start core
23
ACPCore.Start(null);
24
}
Copied!

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:
1
<uses-permission android:name="android.permission.INTERNET" />
2
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
Copied!

Watch the Video

Video: How to use Cocoapods and Gradle with SDK extensions & dependencies

Additional information

Get help

Last modified 14d ago