Integrate Reclaim Protocol end to end using our agent
logoReclaim Protocol Docs

React Native

Steps to install Reclaim InApp SDK on apps built with React Native without a framework

Installation

npm install @reclaimprotocol/inapp-rn-sdk

Setup

Android Setup

Add the following to your android/app/src/main/AndroidManifest.xml file under the <application> tag:

      <activity
        android:name="org.reclaimprotocol.inapp_sdk.ReclaimActivity"
        android:theme="@style/Theme.ReclaimInAppSdk.LaunchTheme"
        android:configChanges="orientation|keyboardHidden|keyboard|screenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"
        android:hardwareAccelerated="true"
        android:windowSoftInputMode="adjustResize"
        />

add the following to the end of settings.gradle:

dependencyResolutionManagement {
    repositoriesMode.set(RepositoriesMode.PREFER_SETTINGS)
    String flutterStorageUrl = System.env.FLUTTER_STORAGE_BASE_URL ?: "https://storage.googleapis.com"
    String reclaimStorageUrl = System.env.RECLAIM_STORAGE_BASE_URL ?: "https://reclaim-inapp-sdk.s3.ap-south-1.amazonaws.com/android/repo"
    repositories {
        google()
        mavenCentral()
        maven {
            url "$reclaimStorageUrl"
        }
        maven {
            url "$flutterStorageUrl/download.flutter.io"
        }
    }
}

If the above doesn't work, alternatively add the following repositories to the relevant repositories block:

String flutterStorageUrl = System.env.FLUTTER_STORAGE_BASE_URL ?: "https://storage.googleapis.com"
String reclaimStorageUrl = System.env.RECLAIM_STORAGE_BASE_URL ?: "https://reclaim-inapp-sdk.s3.ap-south-1.amazonaws.com/android/repo"
// ...
maven {
    url "$reclaimStorageUrl"
}
maven {
    url "$flutterStorageUrl/download.flutter.io"
}

iOS Setup

Updating Podfile

  1. Make sure to have a platform declaration for your project in your Podfile with version 14.0 or higher.
platform :ios, '14.0' # or platform :ios, min_ios_version_supported
  1. Run pod install inside the ios/ directory of your project.
cd ios/
pod install

Update Environment Variables for XCScheme

Ready

With the above steps completed, try building & running your project on any iOS device. You can now continue with our React Native Get Started Guide.

Advanced iOS Setup

On this page