Integration
Options for including the ReadyRemit React Native SDK in a React Native Application
Expo (Recommended)
- Compatibility
- Supported in Expo Prebuild/Custom Dev Client/EAS Build.
- Not supported in Expo Go (Managed).
-
Obtain the distribution tarball, e.g.
react-native-ready-remit-sdk-X.Y.Z.tgz. -
Install the package:
yarn add file:./react-native-ready-remit-sdk-X.Y.Z.tgz -
Install the build properties plugin (required for managing native build targets):
yarn add expo-build-properties -
Add the config plugin to
app.json:{ "expo": { "plugins": [ "react-native-ready-remit-sdk/plugin/with-readyremit-sdk", ["expo-build-properties", { "ios": { "deploymentTarget": "16.0" }, "android": { "compileSdkVersion": 36, "targetSdkVersion": 36, "minSdkVersion": 26, "kotlinVersion": "2.0.21", "gradlePluginVersion": "8.9.1" } }] ] } } -
Generate native projects and install pods:
npx expo prebuild --clean -
(Android) Fix manifest merger conflict by editing
android/app/src/main/AndroidManifest.xml:<manifest xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools"> <!-- ... --> <application ... tools:replace="android:allowBackup"> <!-- ... --> </application> </manifest> -
Run with a custom dev client or build with EAS:
npx expo run:ios npx expo run:android # or eas build --profile development --platform ios eas build --profile development --platform android
React Native (Bare) – Package Installation (TGZ)
Installing the SDK
-
Obtain the distribution tarball, e.g.
react-native-ready-remit-sdk-X.Y.Z.tgz. -
Add the package to your app:
# npm npm install ./react-native-ready-remit-sdk-10.0.0.tgz # yarn yarn add file:./react-native-ready-remit-sdk-10.0.0.tgz -
Verify it appears in
package.jsonunderdependenciesas"react-native-ready-remit-sdk". -
React Native autolinking will register the native modules on both platforms during build.
New Architecture (Required)
iOS - Enable New Architecture
Add the following line at the top of your ios/Podfile:
# Enable New Architecture (required for ReadyRemit SDK TurboModules)
ENV['RCT_NEW_ARCH_ENABLED'] = '1'Then reinstall pods:
cd ios
rm -rf Pods Podfile.lock
pod installAndroid - Enable New Architecture
Update android/gradle.properties:
newArchEnabled=trueThen clean and rebuild:
cd android && ./gradlew cleaniOS
-
Update your
ios/Podfile:- Add
ENV['RCT_NEW_ARCH_ENABLED'] = '1'at the top (see New Architecture section above) - Ensure
platform :ios, '16.0'is set
- Add
-
Install CocoaPods dependencies:
cd ios && pod install -
Build and run:
# From the project root npm run ios # or yarn ios
Android
Requirements
| Component | Minimum Version |
|---|---|
| JDK | 17 |
| Android Gradle Plugin | 8.9.1+ |
| Kotlin | 2.0.21+ |
| Gradle | 8.12+ |
| Compile SDK | 36 |
| Target SDK | 36 |
| Min SDK | 26 |
Configuration
1. Update android/build.gradle (project-level)
android/build.gradle (project-level)buildscript {
ext {
buildToolsVersion = "36.0.0"
minSdkVersion = 26
compileSdkVersion = 36
targetSdkVersion = 36
kotlinVersion = "2.0.21" // or higher
}
repositories {
google()
mavenCentral()
}
dependencies {
classpath("com.android.tools.build:gradle:8.9.1")
classpath("com.facebook.react:react-native-gradle-plugin")
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:2.0.21")
classpath("org.jetbrains.kotlin:compose-compiler-gradle-plugin:2.0.21")
}
}
apply plugin: "com.facebook.react.rootproject"
allprojects {
repositories {
google()
mavenCentral()
}
}2. Update android/gradle/wrapper/gradle-wrapper.properties
android/gradle/wrapper/gradle-wrapper.propertiesdistributionUrl=https\://services.gradle.org/distributions/gradle-8.12-all.zip3. Update android/gradle.properties
android/gradle.propertiesandroid.useAndroidX=true
android.enableJetifier=true
newArchEnabled=true
# Suppress warning for compileSdk 36 if using older AGP
android.suppressUnsupportedCompileSdk=36
# Increase Gradle memory to avoid Java heap space / Jetifier OOM
org.gradle.jvmargs=-Xmx4096m -XX:MaxMetaspaceSize=1024m -Dkotlin.daemon.jvm.options=-Xmx2048m4. Enable Jetpack Compose in your app module
The ReadyRemit SDK uses Jetpack Compose. You must enable Compose in your app module:
apply plugin: "com.android.application"
apply plugin: "org.jetbrains.kotlin.android"
apply plugin: "com.facebook.react"
apply plugin: "org.jetbrains.kotlin.plugin.compose" // Add this line
android {
// ... your existing config ...
buildFeatures {
compose true // Add this block
}
}Note: The SDK wrapper already includes the required Compose dependencies via its BOM. You only need to enable the Compose plugin and buildFeatures in your app module.
5. Build and run:
# From the project root
npm run android
# or
yarn androidTroubleshooting
-
Manifest Merger error referencing
appComponentFactory- Add
tools:replace="android:appComponentFactory"to the<application>as shown above. - Confirm
android.useAndroidX=trueandandroid.enableJetifier=trueingradle.properties.
- Add
-
Manifest Merger conflict:
android:allowBackup- Add
tools:replace="android:allowBackup"and set the desired value in your app manifest:<manifest xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools"> <application tools:replace="android:allowBackup" android:allowBackup="true" ... /> </manifest>
- Add
-
Compose compiler runtime mismatch
- Enable
buildFeatures { compose true }only in modules that include those dependencies.
- Enable
-
Jetifier OutOfMemory during build or
Java heap spaceerrors- Increase Gradle memory via
org.gradle.jvmargsas shown above ingradle.properties. - Typical values:
-Xmx4096mfor Gradle and-Xmx2048mfor Kotlin daemon.
- Increase Gradle memory via
Updated 4 days ago
