Skip to main content

Preparation

To setup the React Native Video SDK bridge correctly, you must complete the steps below.

Requirements​

The minimum requirements for this SDK are:

  • iOS 13.0 and higher
  • Android minSdkVersion 21, compileSdk 34, Java 17
  • React Native 0.71 and higher (uses the classic native-module bridge, not a Fabric view, so older RN versions work too)

Installation​

Add the package to your project:

yarn add amani-react-native-videosdk

iOS setup​

Amani's native iOS SDK lives in a private CocoaPods spec repo. Add both sources to your app's Podfile, with Amani's repo listed first:

source "https://github.com/AmaniTechnologiesLtd/Mobile_SDK_Repo"
source "https://cdn.cocoapods.org/"
note

Use the CDN url for the second source, not https://github.com/CocoaPods/Specs. That older git url forces pod install to clone the entire CocoaPods/Specs repository history (multiple GB) instead of using the fast metadata CDN most setups already have cached.

AmaniVideoSDK ships as a distribution-built XCFramework, so your Podfile's post_install needs to mark it — and its vendored dependencies — as built for library distribution:

post_install do |installer|
installer.pods_project.targets.each do |target|
if ['AmaniVideoSDK', 'WebRTC-lib', 'Socket.IO-Client-Swift', 'Starscream'].include?(target.name)
target.build_configurations.each do |config|
config.build_settings['BUILD_LIBRARY_FOR_DISTRIBUTION'] = 'YES'
end
end
end
end

Then install the pods:

cd ios && pod install

Required Info.plist keys​

You must have the following keys in your application's Info.plist file:

note

You need to add all keys according to your usage.

For Camera:

<key>NSCameraUsageDescription</key>
<string>This application requires access to your camera for the video call.</string>

For Microphone:

<key>NSMicrophoneUsageDescription</key>
<string>This app needs to use the microphone for video call features</string>

For Location:

<key>NSLocationWhenInUseUsageDescription</key>
<string>This application requires access to your location to upload the document.</string>
<key>NSLocationUsageDescription</key>
<string>This application requires access to your location to upload the document.</string>
<key>NSLocationAlwaysUsageDescription</key>
<string>This application requires access to your location to upload the document.</string>
<key>NSLocationAlwaysAndWhenInUseUsageDescription</key>
<string>This application requires access to your location to upload the document.</string>

Required background modes​

You need to add Background Modes on the Signing and Capabilities section on your project, so the call's audio session survives being backgrounded mid-call.

Required background modes:

  • Audio, AirPlay and Picture in Picture
  • Voice over IP

Alternatively you can add the block below on your Info.plist file:

<key>UIBackgroundModes</key>
<array>
<string>audio</string>
<string>voip</string>
</array>
warning

This bridge does not request camera/microphone permissions itself — same contract as the native SDK. Request them in your app before calling present().

Android setup​

Amani's native Android SDK is hosted on a public (no auth needed) Artifactory Maven repository. Add it to both your project's root android/build.gradle and your android/app/build.gradle — Gradle resolves each module's dependencies using that module's own declared repositories, so both need it, not just one:

repositories {
maven { url "https://jfrog.amani.ai/artifactory/amani-video-sdk" }
}

That's it — no other Gradle changes are needed:

  • Required permissions (CAMERA, RECORD_AUDIO, INTERNET) are already declared in the native SDK's own manifest and merge in automatically.
  • The required ProGuard rules ship in this package's consumer-rules.pro automatically.
note

Verify the pinned native SDK version against https://jfrog.amani.ai/artifactory/amani-video-sdk/ai/amani/android/amanivideosdk/ before assuming a newer one has the same feature set as this bridge documents — a published binary can lag behind its own source tree by several months.

You're now ready to use our SDK.