✨Works out of the box guarantee. If you face any issue at all, hit us up on Telegram and we will write the integration for you.
logoReclaim Protocol Docs
Ionic SDK

Installation

Reclaim Protocol's Capacitor SDK

Reclaim Capacitor SDKDocumentationNPM Version

Prerequisites

Get an API Key

Setup your project using the Get API Key guide.

Installation

npm install @reclaimprotocol/inapp-capacitor-sdk
npx cap sync

Alternative: Install from git source

npm install git+https://github.com/reclaimprotocol/reclaim-inapp-capacitor-sdk.git
npx cap sync

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/0.3.0/repo"
    repositories {
        google()
        mavenCentral()
        maven {
            url "$reclaimStorageUrl"
        }
        maven {
            url "$flutterStorageUrl/download.flutter.io"
        }
    }
}

(Ignore if already added in settings.gradle from above) or 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/0.3.0/repo"
// ...
maven {
    url "$reclaimStorageUrl"
}
maven {
    url "$flutterStorageUrl/download.flutter.io"
}

iOS Setup

  1. Make sure to have a platform declaration for your project in your Podfile with version 13.0 or higher.
platform :ios, '13.0' # or platform :ios, min_ios_version_supported

Ignore if you already have this declaration in your Podfile.

  1. Add the following to your Podfile to override SDK dependency:
  • This step is only required when facing issues with the resolved pod dependency.
  • You can override the version of dependency when you wish to use a specific version of the SDK.
  • You can add a declaration in your Podfile to install the SDK from cocoapods, or from a specific git tag, head, commit, or branch.
# Cocoapods is the recommended way to install the SDK.
pod 'ReclaimInAppSdk', '~> 0.3.0'
  • After adding the dependency, your podfile may look like this:
platform :ios, '13.0'
 
# ... some podfile content (removed for brevity)
 
target 'App' do
  capacitor_pods
  # Add your Pods here
  # This is the line that you may need to add in your podfile.
  pod 'ReclaimInAppSdk', '~> 0.3.0'
end
# ... rest of the podfile. (removed for brevity)
  1. Run pod install inside the ios/ directory of your project.
cd ios/
pod install

Fixing runtime routing issue on iOS

This library uses a golang static library. Use of this has raised an issue in capacitor's swift router, causing the app to crash on startup with error message: Error: The file "public" couldn't be opened.

iOS crash

There are open issues on both capacitor and golang's issue tracker to dicuss this problem:

A simple workaround is available to fix this issue and requires a custom view controller to be used in ios.

Fixing performance issues on IOS physical devices

Your app performance will be severely impacted when you run debug executable on a physical device. Fixing this requires a simple change in your Xcode project xcscheme.

On this page