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).
  1. Obtain the distribution tarball, e.g. react-native-ready-remit-sdk-X.Y.Z.tgz.

  2. Install the package:

    yarn add file:./react-native-ready-remit-sdk-X.Y.Z.tgz
  3. Install the build properties plugin (required for managing native build targets):

    yarn add expo-build-properties
  4. 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"
            }
          }]
        ]
      }
    }
  5. Generate native projects and install pods:

    npx expo prebuild --clean
  6. (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>
  7. 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

  1. Obtain the distribution tarball, e.g. react-native-ready-remit-sdk-X.Y.Z.tgz.

  2. 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
  3. Verify it appears in package.json under dependencies as "react-native-ready-remit-sdk".

  4. 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 install

Android - Enable New Architecture

Update android/gradle.properties:

newArchEnabled=true

Then clean and rebuild:

cd android && ./gradlew clean

iOS

  1. 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
  2. Install CocoaPods dependencies:

    cd ios && pod install
  3. Build and run:

    # From the project root
    npm run ios
    # or
    yarn ios

Android

Requirements

ComponentMinimum Version
JDK17
Android Gradle Plugin8.9.1+
Kotlin2.0.21+
Gradle8.12+
Compile SDK36
Target SDK36
Min SDK26

Configuration

1. Update 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

distributionUrl=https\://services.gradle.org/distributions/gradle-8.12-all.zip

3. Update android/gradle.properties

android.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=-Xmx2048m

4. 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 android

Troubleshooting

  • Manifest Merger error referencing appComponentFactory

    • Add tools:replace="android:appComponentFactory" to the <application> as shown above.
    • Confirm android.useAndroidX=true and android.enableJetifier=true in gradle.properties.
  • 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>
  • Compose compiler runtime mismatch

    • Enable buildFeatures { compose true } only in modules that include those dependencies.
  • Jetifier OutOfMemory during build or Java heap space errors

    • Increase Gradle memory via org.gradle.jvmargs as shown above in gradle.properties.
    • Typical values: -Xmx4096m for Gradle and -Xmx2048m for Kotlin daemon.

What’s Next