Skip to content

Latest commit

 

History

History
136 lines (93 loc) · 5.03 KB

get-the-sdk.md

File metadata and controls

136 lines (93 loc) · 5.03 KB

Get the SDK

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" %}

Android

{% hint style="warning" %} Adobe Experience Platform SDK for Android supports Android 4.0 (API 14) or later. {% endhint %}

  1. Open the 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 Android.
  3. 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:

{% endtab %}

{% tab title="Objective C" %}

iOS - Objective C

{% hint style="warning" %} Important: Adobe Experience Platform SDKs for iOS supports iOS 10 or later. {% endhint %}

  1. Open the 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.

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:

{% endtab %}

{% tab title="Swift" %}

iOS - Swift

{% hint style="warning" %} Important: Adobe Experience Platform SDKs for iOS supports iOS 10 or later. {% endhint %}

  1. Open the 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 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:

{% endtab %}

{% tab title="React Native" %}

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

Configure native projects

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

Linked Frameworks required for React Native

{% 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 %}

Watch the Video

{% embed url="https://www.youtube.com/watch?v=K99NwR6Y08E" caption="Video: How to use Cocoapods and Gradle with SDK extensions & dependencies" %}

Additional Information