This repository is a monorepo and contains a collection of React Native modules for Adobe Experience Platform Mobile SDK as listed below. These modules can be found in the packages directory.
Package Name | Latest Version | Native Extension | New Architecture Compatibility |
---|---|---|---|
@adobe/react-native-aepcore (required) | Mobile Core | Supported | |
@adobe/react-native-aepuserprofile | Profile | Supported | |
@adobe/react-native-aepedge | Edge | Supported | |
@adobe/react-native-aepedgeidentity | EdgeIdentity | Supported | |
@adobe/react-native-aepedgeconsent | EdgeConsent | Supported | |
@adobe/react-native-aepedgebridge | EdgeBridge | Supported | |
@adobe/react-native-aepmessaging | Messaging | Supported | |
@adobe/react-native-aepassurance | Assurance | Supported | |
@adobe/react-native-aepoptimize | Optimize | Supported | |
@adobe/react-native-aepplaces | Places | Supported | |
@adobe/react-native-aeptarget | Target | Supported | |
@adobe/react-native-aepcampaignclassic | CampaignClassic | Not Supported |
Note
Since version 5.0.0 of the Adobe React Native SDK, all React Native libraries that share the same major version are compatible with each other.
Note
The React Native libraries within this repository are specifically designed to support the Android and iOS platforms only.
Important
The Adobe React Native SDK utilizes the React Native interop layer to ensure compatibility with new architecture.
- React Native
Requires React Native (0.60.0 and above)
- Xcode
To submit iOS apps to the App Store, you must build them using Xcode 15 or later, as required by Apple.
Important
Starting from Adobe Experience Platform React Native 6.x, the libraries depend on Experience Platform iOS 5.x SDKs, which have been updated to align with Apple's latest guidelines on privacy manifest. For further details on how Apple's privacy-related announcements affect the Adobe mobile SDK for iOS, please refer to this document.
Please refer to the Expo Integration document for guidance on integrating the SDK with Expo projects.
You need to install Adobe Experience Platform Mobile SDK with npm packages and configure the native Android/iOS project in your React Native project.
Note: If you are new to React Native, we suggest you follow the React Native Getting Started page before continuing.
Adobe Experience Platform Mobile SDK packages can be installed from npm command.
Note:
@adobe/react-native-aepcore
is required to be installed.
Install the @adobe/react-native-aep{extension}
package:
cd MyReactApp
npm install @adobe/react-native-aep{extension}
Alternatively, include the Adobe Experience Platform npm packages as dependencies in the app’s package.json.
The following code snippet shows for Mobile Core and Edge Network extensions as an example in package.json:
...
"dependencies": {
"react-native": "0.72.5",
"@adobe/react-native-aepcore": "^7.0.0", //core is required and includes aepcore, aepsignal, aeplifecycle, aepidentity libraries
"@adobe/react-native-aepedge": "^7.0.0",
"@adobe/react-native-aepedgeidentity": "^7.0.0",
"@adobe/react-native-aepedgeconsent": "^7.0.0",
...
},
Inside of the app directory, run
#if using node package manager
npm install
or
#if using yarn package manager
yarn install
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 ..
In your React Native application, import the extensions.
The following example demonstrates how to import core extensions from the Adobe Experience Platform SDK in your React Native application:
import { MobileCore, Lifecycle, Signal, LogLevel, PrivacyStatus, Event } from '@adobe/react-native-aepcore'
Refer to each package's documentation for specific import details.
Then, initialize the SDK using the following methods:
Note
Starting from Adobe Experience Platform React native 7.x, there is no longer a need to initialize the SDK on the native platforms, as was required in earlier versions.
See migration.md for guidance on migrating from ACP React Native libraries.
- Getting error when building on iOS Xcode
Use of '@import' when C++ modules are disabled, consider using -fmodules and -fcxx-modules
Refer to the solution here.
- Getting error when building on iOS
Underlying Objective-C module 'AEPRulesEngine' not found
Refer to the solution here.
Refer to the sample apps for example implementations.
Contributions are welcomed! See CONTRIBUTING and development.md guides for more information.
This project is licensed under the Apache V2 License. See LICENSE for more information.