---
title: Install the Monetate SDKs
slug: sdks/monetate-sdk-install
description: How to install the React Web, React Native, iOS, and Android versions of the Monetate SDK
image:  https://archbee-image-uploads.s3.amazonaws.com/ceIfEvQHzQk1IVxoRWUh7/K9eTL4jKm7UQINb6zNziJ-20250912-181225.png
docTags: 
createdAt: 2024-06-14T19:01:28.065Z
---

This documentation guides you through setting up and implementing the React Web, React Native, iOS, and Android versions of the Monetate SDK.

::::ExpandableHeading{isOpen="true"}
## React Web

### Prerequisites

You must have Node and Yarn installed to set up this SDK. Refer to the installation instructions for [Node](https://nodejs.org/en/download/package-manager) and [Yarn](https://classic.yarnpkg.com/en/docs/install#windows-stable) 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:

:::CodeblockTabs
Command to Set the Default Artifactory npm Registry

```shell
npm config set registry https://monetate.jfrog.io/artifactory/api/npm/monetate-npm-local
```
:::

Next, install the desired SDK packages with each of the following codes:

:::CodeblockTabs
Command to Install the Web SDK Package

```shell
npm install @personalization-js-sdk/web
```
:::

:::CodeblockTabs
Command to Install the Common SDK Package

```shell
npm install @personalization-js-sdk/common
```
:::

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:

:::CodeblockTabs
Code to Initialize an Object to Communicate with Engine API

```shell
const sdkInstace = new Personalization(account, user);
```
:::
::::

::::ExpandableHeading{isOpen="true"}
## React Native

### Prerequisites

You must have Node and Yarn installed to set up this SDK. Refer to the installation instructions for [Node](https://nodejs.org/en/download/package-manager) and [Yarn](https://classic.yarnpkg.com/en/docs/install#windows-stable) 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:

:::CodeblockTabs
Command to Set the Default Artifactory npm Registry

```shell
npm config set registry https://monetate.jfrog.io/artifactory/api/npm/monetate-npm-local
```
:::

Next, install the desired SDK packages with each of the following codes:

:::CodeblockTabs
Command to Install the React Native SDK Package

```shell
npm install @personalization-js-sdk/react-native
```
:::

:::CodeblockTabs
Command to Install the Common SDK Package

```shell
npm install @personalization-js-sdk/common
```
:::

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:

:::CodeblockTabs
Code to Initialize an Object to Communicate with Engine API

```shell
const sdkInstace = new Personalization(account, user);
```
:::
::::

::::ExpandableHeading{isOpen="true"}
iOS

Monetate iOS SDK Integration



:::Heading{depth="2" indent="1"}
Swift Package Manager (SPM)
:::

Added support for **Swift Package Manager (SPM)** integration starting from version **2026.02.03**


Overview



This document provides step-by-step instructions for integrating the Monetate Personalization iOS SDK using `Swift Package Manager (SPM)`.

Swift Package Manager is the recommended dependency management approach for modern iOS applications.

## Environment Requirements

Before proceeding, ensure your environment meets the following requirements:

- **Xcode:** 14.0 or later (latest stable version recommended)&#x20;
- **iOS Deployment Target:** iOS 13.0+&#x20;
- **Swift Version:** 5.7+&#x20;
- **Monetate Account:** Active Monetate account credentials&#x20;

## Project Requirements

Your application must meet the following conditions:

- Project supports **Swift Package Manager**&#x20;
- Outbound HTTPS requests are allowed&#x20;
- Network permissions are enabled&#x20;
- App Transport Security (ATS) configured if required&#x20;
- The `main` branch can be used by default. However, if production control or version stability is required, a specific version or tagged release should be used.


Installation



## Method 1 — Using Xcode (Recommended)

1. Open your project in **Xcode**&#x20;
2. Navigate to: `File → Add Package Dependencies`…&#x20;
3. Enter the Monetate repository URL: [https://github.com/monetate/monetate-personalization-ios-sdk.git](https://github.com/monetate/monetate-personalization-ios-sdk.git)
4. Choose:&#x20;
   - main branch OR a specific tagged version.
5. Select your app target&#x20;
6. Click **Add Package** .


### Verify Installation

Go to:

:::BlockQuote
Project → Package Dependencies
:::

You should see the Monetate SDK listed.

## Method 2 — Manual SPM Configuration (Package.swift)

If your project manages dependencies manually:

### 1. Add Dependency

**&#x20;Add the Monetate SDK&#x20;**&#x20;to your Package.swift file:&#x20;

:::CodeblockTabs
IOS

```swift
 dependencies: [
            .package(
                url: "https://github.com/monetate/monetate-personalization-ios-sdk.git",
                branch: "main"
            )
        ]
```
:::

1. **Add the Monetate SDK to your target:**&#x20;


:::CodeblockTabs
IOS

```swift
 .target(
    name: "YourApp",
    dependencies: [
        .product(name: "Monetate", package: "monetate-personalization-ios-sdk")
    ]
)
```
:::

1. **Import the SDK where needed:**&#x20;


:::CodeblockTabs
IOS

```swift
import Monetate
```
:::

**Note:&#x20;**&#x55;se the main branch by default, or specify a tagged version if production version&#x20;

control is required.

Build the project to resolve and fetch dependencies.

# Usage

After successful installation:

1. Import the SDK module in your Swift files.&#x20;
2. Initialize the SDK using your Monetate account credentials.&#x20;
3. Confirm successful initialization before triggering personalization calls.&#x20;

(Refer to the Initialization Guide for detailed setup instructions.)
&#x20;

# Troubleshooting

If you encounter build or installation issues:

## Basic Steps

- Clean build folder `Shift + Cmd + K`&#x20;
- Delete Derived Data&#x20;
- Ensure package is added to the correct target&#x20;
- Confirm product dependency is properly linked&#x20;

## Advanced Steps

- Remove and re-add the package&#x20;
- Reset package cache: `File → Packages → Reset Package Caches`

**Restart Xcode after dependency resolution**&#x20;

***

:::Heading{depth="2" indent="1"}
Cocoapods
:::

### Prerequisites

You must have CocoaPods installed to set up this SDK. Refer to [Getting Started](https://guides.cocoapods.org/using/getting-started.html#getting-started) in the [CocoaPods Guides](https://guides.cocoapods.org/using/getting-started.html) 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:

:::CodeblockTabs
Code to Begin Installing Monetate SDK

```swift
target 'monetate' do
  # Comment the next line if you do not want to use dynamic frameworks
  use_frameworks!
  pod 'monetate-ios-sdk'
  # Pods for monetate
  post_install do |installer|
    installer.generated_projects.each do |project|
	  project.targets.each do |target|
	    target.build_configurations.each do |config|
		  config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '13.0'
		end
	  end
	end
  end
end
```
:::

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.

![Callout of the monetate-ios-sdk folder in the location of the SDK in the Pods directory](https://dyzz9obi78pm5.cloudfront.net/app/image/id/656df6a259ab2941084b64d2/n/1701705376875.png)

### Getting Started

Use the following code to initialize an object to communicate with the Engine API:

:::CodeblockTabs
Code to Initialize an Object to Communicate with Engine API

```swift
final var objPersonalization = Personalization(account: Account(instance: "p", domain: "localhost.org", name: "a-701b337c", shortname: "localhost"), user: User(monetateId: "2.1454546575.1711006580023", deviceId: "62bd2e2d-213d-463f-83bb-12c0b2530a14", customerId: "12345"))
```
:::
::::

::::ExpandableHeading{isOpen="true"}
## Android

### Prerequisites

You must have Android Studio installed to set up this SDK. Refer to the [Android Studio](https://developer.android.com/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](https://monetate.jfrog.io/ui/native/monetate-android-local/com/monetate/personalization/androidsdk/monetate-personalization-android-sdk), ensuring that you download the latest version, and then open your app project and switch to **Project View**.

![Project View in Android Studio, with a callout of the Project selector](https://dyzz9obi78pm5.cloudfront.net/app/image/id/637bb2a6006bb023c008061c/n/android-sdk-project-view.PNG)

Next, copy and paste the SDK into the **app** > **libs** directory.

![Callout of the libs directory in Android Studio](https://dyzz9obi78pm5.cloudfront.net/app/image/id/637bb2d3242da2063d63b56a/n/android-sdk-project-view-lib-directory.PNG)

Open the `build.gradle(:app)` file and include the following code under the dependencies section:

:::CodeblockTabs
Dependencies Code

```java
implementation fileTree(include: ['*.jar'], dir: 'libs')
```
:::

![Callout of the implementation fileTree(include: \['*.jar'\], dir: 'libs') line of code in Android Studio](https://dyzz9obi78pm5.cloudfront.net/app/image/id/637bb30073b22f42a40295d4/n/android-sdk-gradle-integration.PNG)

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:

:::CodeblockTabs
Code to Initialize an Object to Communicate with Engine API

```java
sdkInstace = new Personalization(account, user);
```
:::
::::

