React Native SDK

Guide for integrating Purchasely SDK inside your React Native app

Installation

NPM

You can use NPM to install Purchasely by adding it to your Podfile:

npm install react-native-purchasely --save

Don't forget to change the minimum OS versions to match Purchasely requirements (iOS 11 / Android 21)

iOS
Android
iOS
// Podfile
...
platform :ios, '11.0'
...
Android
// Edit file android/build.gradle
buildscript {
ext {
buildToolsVersion = "29.0.2"
minSdkVersion = 21 //min version must not be below 21
compileSdkVersion = 29
targetSdkVersion = 29
}
}
allprojects {
repositories {
mavenCentral()
}
}
-------
//Edit file android/app/build.gradle
dependencies {
//Add this line to integrate Google Play Billing
implementation 'io.purchasely:google-play:2.5.0'
}

Huawei Integration

To integrate Huawei Mobile Services, please refer to our Android documentation : https://docs.purchasely.com/quick-start/sdk-installation/quick-start#huawei-mobile-services