The Adobe Experience Platform Mobile SDK is available for iOS via Cocoapods, Android via Gradle, and for React Native projects via Node Package Manager. Follow the directions below to learn how to incoporate the Experience Platform Mobile SDK into your application.
{% hint style="info" %} For iOS and Android projects, the recommended approach to integrating the SDK is to use Cocoapods or Gradle. SDK libraries are also available on Github. {% endhint %}
{% tabs %} {% tab title="Android" %}
{% hint style="warning" %} Adobe Experience Platform SDK for Android supports Android 4.0 (API 14) or later. {% endhint %}
- Open the Mobile property in Launch, and click on the Environments tab, and then click on the install package icon
- On the Mobile Install Instructions dialog box, select Android.
- Follow the instructions for using Gradle with Android.
The necessary dependencies and initialization code can be copied from the dialog box to your app project.
You should see a dialog box similar to the following:
{% tab title="Objective C" %}
{% hint style="warning" %} Important: Adobe Experience Platform SDKs for iOS supports iOS 10 or later. {% endhint %}
- Open the Mobile property in Launch, and click on the Environments tab, and then click on the install package icon
- On the Mobile Install Instructions dialog box, select iOS.
- Follow the instructions for using CocoaPods with iOS.
- Under the initialization code, choose Objective C.
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:
{% tab title="Swift" %}
{% hint style="warning" %} Important: Adobe Experience Platform SDKs for iOS supports iOS 10 or later. {% endhint %}
- Open the Mobile property in Launch, and click on the Environments tab, and then click on the install package icon
- On the Mobile Install Instructions dialog box, select iOS.
- Follow the instructions for using CocoaPods with iOS.
- Under the initialization code, choose 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:
{% tab title="React Native" %}
{% hint style="info" %} For React Native, it is recommended to first install Node.js to download packages from npm.
See this tutorial for additional instructions on getting started with React Native applications {% endhint %}
@adobe/react-native-acpcore
is a wrapper around the iOS and Android Adobe Experience Platform Mobile SDK to allow for integration with React Native applications. Functionality to enable the Core extension is provided entirely through JavaScript documented below.
First create the React Native project (if one does not already exist)
react-native init MyReactApp
Install and link kthe @adobe/react-native-acpcore
package:
npm install @adobe/react-native-acpcore
react-native link @adobe/react-native-acpcore
Android project
Navigate to MainApplication.java
under app/src/main/java/com/<project-name>/
and add a call to MobileCore.setApplication(this)
inside of onCreate()
.
import com.adobe.marketing.mobile.MobileCore; // import MobileCore
@Override
public void onCreate() {
super.onCreate();
//...
MobileCore.setApplication(this); // add this line
}
iOS project
Inside your Xcode project click on the project file and under the General tab click the + button under the Lined Frameworks and Libraries section. Add the following frameworks and libraries:
UIKit.framework
SystemConfiguration.framework
WebKit.framework
UserNotifications.framework
libsqlite3.0.tbd
libc++.tbd
libz.tbd
{% hint style="info" %}
Note: If you plan to use the AEP SDK in your native iOS code you will need to import the appropriate headers with the following format: #import <RCTACPCore/ACPCore.h>
{% endhint %}
{% endtab %}
{% endtabs %}
{% embed url="https://www.youtube.com/watch?v=K99NwR6Y08E" caption="Video: How to use Cocoapods and Gradle with SDK extensions & dependencies" %}
- How to use Gradle for Android
- How to use CocoaPods for iOS
- Obtaining Current SDKs