Skip to main content

Preparation for iOS

To setup iOS SDK correctly, you must complete the steps below.

Requirements

The minimum requirements for this SDK are:

  • iOS 13.0 and higher
  • Xcode 14 and higher (after version 1.1.1)

Installation

Via cocoapods

Add these source lines on top of your Podfile

source "https://github.com/AmaniTechnologiesLtd/Mobile_SDK_Repo"
source "https://github.com/CocoaPods/Specs"

Add this line on your target:

pod "AmaniVideoSDK"

You'll also need to add the post install hook

post_install do |installer|
xcode_base_version = `xcodebuild -version | grep 'Xcode' | awk '{print $2}' | cut -d . -f 1`

installer.generated_projects.each do |project|
project.targets.each do |target|
target.build_configurations.each do |config|
# This block is needed if you're using xcode 15
if config.base_configuration_reference && Integer(xcode_base_version) >= 15
xcconfig_path = config.base_configuration_reference.real_path
xcconfig = File.read(xcconfig_path)
xcconfig_mod = xcconfig.gsub(/DT_TOOLCHAIN_DIR/, "TOOLCHAIN_DIR")
File.open(xcconfig_path, "w") { |file| file << xcconfig_mod }
end
if target.name != 'Socket.IO-Client-Swift'
config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '9.0'
end
if target.name == 'WebRTC-lib'
config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '13.0'
end
end
end
end
end

You may need to run following command before run pod install

pod repo update

Required Permissions

Amani SDK makes use of the device's Camera, Location and NFC. If you dont want to use location service please provide in init method. 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 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>

For Microphone

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

For Camera

<key>NSCameraUsageDescription</key>
<string>This application requires access to your camera for scanning and uploading the document.</string>

Required background modes

You need to add Background Modes on the Signing and Capabilities section on your project.

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>

Preparation for Android

To setup Android SDK correctly, you must complete the steps below.

General Requirements

The minimum requirements for the SDK are:

  • minSdkVersion 21
  • compileSdk 34

Compiled with Java 17, minimum Java Version should be 17 as follows.

    compileOptions {
sourceCompatibility JavaVersion.VERSION_17
targetCompatibility JavaVersion.VERSION_17
}

kotlinOptions {
jvmTarget=17
}

kotlin {
jvmToolchain(17)
}

Required Permissions

This SDK makes use of the devices Camera, Location and NFC permissions. If you don't want to use location service, please provide in init method.

You must have the folowing keys in your application's manifest file:

<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.CAMERA" />
<uses-permission android:name="android.permission.RECORD_AUDIO" />

ProGuard Rule Usage

  • If you are using ProGuard in your application, you just need to add this line into your ProGuard Rules!
-keep class ai.amani** {*;}
-dontwarn ai.amani**
-keep class com.cloudwebrtc.webrtc.** { *; }
-keep class org.webrtc.** { *; }

Installation Latest Version

  1. Add the following dependencies to your Module build.gradle file.
    implementation 'ai.amani.android:amanivideosdk:Tag'
  1. Enable view-binding in the Module build.gradle by adding this line into code block of android {}:
buildFeatures {
viewBinding true
}
  1. Add the following in the Project build.gradle within in buildscript within the buildscript->repositories and buildscript->allprojects.
    maven { url "https://jfrog.amani.ai/artifactory/amani-video-sdk"}

You're now ready to use our SDK.