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.
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:
npm config set registry https://monetate.jfrog.io/artifactory/api/npm/monetate-npm-localNext, install the desired SDK packages with each of the following codes:
npm install @personalization-js-sdk/webnpm install @personalization-js-sdk/commonIf 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:
const sdkInstace = new Personalization(account, user);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:
npm config set registry https://monetate.jfrog.io/artifactory/api/npm/monetate-npm-localNext, install the desired SDK packages with each of the following codes:
npm install @personalization-js-sdk/react-nativenpm install @personalization-js-sdk/commonIf 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:
const sdkInstace = new Personalization(account, user);- 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)
- iOS Deployment Target: iOS 13.0+
- Swift Version: 5.7+
- Monetate Account: Active Monetate account credentials
Project Requirements
Your application must meet the following conditions:
- Project supports Swift Package Manager
- Outbound HTTPS requests are allowed
- Network permissions are enabled
- App Transport Security (ATS) configured if required
- 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)
- Open your project in Xcode
- Navigate to: File → Add Package Dependencies…
- Enter the Monetate repository URL: https://github.com/monetate/monetate-personalization-ios-sdk.git
- Choose:
- main branch OR a specific tagged version.
- Select your app target
- Click Add Package .
Verify Installation
Go to:
You should see the Monetate SDK listed.
Method 2 — Manual SPM Configuration (Package.swift)
If your project manages dependencies manually:
1. Add Dependency
Add the Monetate SDK to your Package.swift file:
dependencies: [
.package(
url: "https://github.com/monetate/monetate-personalization-ios-sdk.git",
branch: "main"
)
]- Add the Monetate SDK to your target:
.target(
name: "YourApp",
dependencies: [
.product(name: "Monetate", package: "monetate-personalization-ios-sdk")
]
)- Import the SDK where needed:
import MonetateNote: Use the main branch by default, or specify a tagged version if production version
control is required.
Build the project to resolve and fetch dependencies.
Usage
After successful installation:
- Import the SDK module in your Swift files.
- Initialize the SDK using your Monetate account credentials.
- Confirm successful initialization before triggering personalization calls.
(Refer to the Initialization Guide for detailed setup instructions.)
Troubleshooting
If you encounter build or installation issues:
Basic Steps
- Clean build folder Shift + Cmd + K
- Delete Derived Data
- Ensure package is added to the correct target
- Confirm product dependency is properly linked
Advanced Steps
- Remove and re-add the package
- Reset package cache: File → Packages → Reset Package Caches
Restart Xcode after dependency resolution
- Cocoapods
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:
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
endNext, 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:
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"))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 , ensuring that you download the latest version, 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:
implementation fileTree(include: ['*.jar'], dir: 'libs')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:
sdkInstace = new Personalization(account, user);