Install the Monetate SDKs
This documentation guides you through setting up and implementing the React Web, React Native, iOS, and Android versions of the Monetate SDK.
React Web
Prerequisites
You must have Node and Yarn installed to set up this SDK. Refer to the installation instructions for Node and Yarn for more information.
Installing and Importing Packages
The React Web version of the Monetate SDK consists of these packages:
- Web: For applications written in React JavaScript
- Common: Methods and constants shared between the React Native and Web packages
To install the SDK packages, first set the default Artifactory npm registry using the following command:
Next, install the desired SDK packages with each of the following codes:
If you encounter a peer dependencies error during installation, add the line --legacy-peer-deps to the installation command.
Getting Started
Use the following code to initialize an object to communicate with the Engine API:
React Native
Prerequisites
You must have Node and Yarn installed to set up this SDK. Refer to the installation instructions for Node and Yarn for more information.
Installing and Importing Packages
The React Native version of the Monetate SDK consists of these packages:
- React Native: For applications written using the React Native framework
- Common: Methods and constants shared between the React Native and Web packages
To install the SDK packages, first set the default Artifactory npm registry using the following command:
Next, install the desired SDK packages with each of the following codes:
If you encounter a peer dependencies error during installation, add the line --legacy-peer-deps to the installation command.
Getting Started
Use the following code to initialize an object to communicate with the Engine API:
iOS
Prerequisites
You must have CocoaPods installed to set up this SDK. Refer to Getting Started in the CocoaPods Guides for more information.
Installing the SDK
Complete the following steps to integrate the SDK within your app.
First, open the PodFile and add the following code:
Next, go to the root path of your project in the terminal and run pod install.
After installation, the SDK appears in the Pods directory in your project sidebar.
Getting Started
Use the following code to initialize an object to communicate with the Engine API:
Android
Prerequisites
You must have Android Studio installed to set up this SDK. Refer to the Android Studio site for more information.
Integrating the SDK into a Project
Complete the following steps to integrate the SDK within your app.
First, download the SDK source, and then open your app project and switch to Project View.
Next, copy and paste the SDK into the app > libs directory.
Open the build.gradle(:app) file and include the following code under the dependencies section:
Finally, click Sync Now in the notification that appears prompting you to perform a project sync.
Getting Started
Use the following code to initialize an object to communicate with the Engine API: