React Native AEP Places Extension
You need to install the SDK with npm and configure the native Android/iOS project in your react native project. Before installing the Places extension it is recommended to begin by installing the Core extension.
Note: If you are new to React Native we suggest you follow the React Native Getting Started page before continuing.
1. Create React Native project
First create a React Native project:
react-native init MyReactApp
Install and link the
cd MyReactAppnpm install @adobe/react-native-acpplaces
- React Native 0.60+
CLI autolink feature links the module while building the app.
- React Native <= 0.59
react-native link @adobe/react-native-acpplaces
cd ios/ && pod install
This project contains jest unit tests which are contained in the
__tests__ directory, to run the tests locally:
Importing the extension:
Getting the extension version:
Registering the extension with ACPCore:
Note: It is recommended to initialize the SDK via native code inside your AppDelegate and MainApplication in iOS and Android respectively. For more information see how to initialize Core.
Get the nearby points of interest:
let location = <latitude> <longitude> <optional altitude> <optional speed> <optional accuracy>;ACPPlaces;
// create a geofencelet geofence = "geofence Identifier" <latitude> <longitude> <radius> <optional expiration-duration>;ACPPlaces;ACPPlaces;
Get the current point of interests:
Get the last known location
Set Authorization status:
Additional React Native Plugins
Below is a list of additional React Native plugins from the AEP SDK suite: