# Technical requirements and installation

# xCode – iOS development

You will need Xcode version 12 or later. Supported iOS versions are 13 and later. To continue running the video conference when your app goes into the background, you must enable the appropriate Background Modes in your app settings. The info.plist file should include the following keys:

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

For the application to work properly with the camera and microphone, add the following lines to the info.plist file:

<key>NSCameraUsageDescription</key>
<string>To allow other people to see you</string>
<key>NSMicrophoneUsageDescription</key>
<string>To allow other people to hear you</string>

To use the SDK, you need to add the TrueConfSDK.xcframework file to your project.

Next, be sure to verify that TrueConfSDK.xcframework is registered in your IDE at the following path: Targets → Project-Name → General → Frameworks, Libraries and Embedded Content, where Project-Name is your project.

Connecting the SDK to the classes of an Objective-C project is done with the following lines:

#import "TrueConfSDK/TrueConf.h"
#import "TrueConfSDK/TrueConfSDK.h"

For Swift projects, simply add the line:

import TrueConfSDK

The framework supports the arm64 architecture for iOS devices, as well as x86_64 and arm64 for simulators.

# Android Studio

The project is designed for use in the Android Studio development environment. The supported Android version is API 24 (Android 7.0) or higher, with targetSdk and compileSdk set to API 34 (Android 14.0). The libraries are compiled using Java 17.

To integrate the SDK, several files in the project need to be modified:

  1. In the .gradle settings file (learn more about it in the official Gradle documentation (opens new window)):

  2. In the repositories section, add the Maven repository. The username and password are provided upon request through your manager:

maven {
    credentials {
        username 'username'
        password 'password'
    }
    url 'https://sdk.trueconf.com/maven/repository/maven-public/'
}
  • In the dependencies section, add the SDK libraries of the required version, for example:
api 'com.trueconf:trueconfsdk:3.0.0.34@aar'
api 'com.trueconf:media:3.0.0.34@aar'
api 'com.trueconf:jnicore:3.0.0.34@aar'
  • Additionally, the following dependencies must be specified in the .gradle:
implementation 'androidx.work:work-runtime:2.9.0'
implementation 'androidx.concurrent:concurrent-futures:1.1.0'
implementation 'androidx.core:core:1.12.0'
implementation 'androidx.appcompat:appcompat:1.6.1'
implementation 'androidx.gridlayout:gridlayout:1.0.0'
implementation 'androidx.mediarouter:mediarouter:1.7.0'
implementation 'androidx.recyclerview:recyclerview:1.3.2'
implementation 'androidx.leanback:leanback:1.0.0'
implementation 'androidx.leanback:leanback-preference:1.0.0'
implementation 'androidx.multidex:multidex:2.0.1'
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
implementation 'androidx.emoji:emoji-bundled:1.1.0'
implementation 'com.google.android.material:material:1.11.0'
implementation 'org.greenrobot:eventbus:3.3.1'

2. Connect the SDK to the project classes in the application code (example for Java):

import com.trueconf.sdk.TrueConfSDK;// to work with SDK methods
import com.trueconf.sdk.TrueConfListener;    // to work with SDK events

3. In the AndroidManifest.xml manifest file:

<uses-feature
      android:glEsVersion="0x00020000"
      android:required="true"/>
  <uses-feature
      android:name="android.hardware.audio.low_latency"
      android:required="false"/>
  <uses-feature
      android:name="android.hardware.camera"
      android:required="false"/>
  <uses-feature
      android:name="android.hardware.camera.autofocus"
      android:required="false"/>
  <uses-feature
      android:name="android.hardware.camera.flash"
      android:required="false"/>
  <uses-feature
      android:name="android.hardware.camera.front"
      android:required="false"/>
  <uses-feature
      android:name="android.hardware.microphone"
      android:required="false"/>
  <uses-feature
      android:name="android.hardware.sensor.accelerometer"
      android:required="false"/>
  <uses-feature
      android:name="android.hardware.sensor.light"
      android:required="false"/>
  <uses-feature
      android:name="android.hardware.sensor.proximity"
      android:required="false"/>
  <uses-feature
      android:name="android.hardware.touchscreen"
      android:required="false"/>
  <uses-feature
      android:name="android.hardware.wifi"
      android:required="false"/>
  <uses-feature
      android:name="android.hardware.bluetooth"
      android:required="false"/>
<uses-permission android:name="android.permission.CAMERA"/>
<uses-permission android:name="android.permission.BLUETOOTH"/>
<uses-permission android:name="android.permission.VIBRATE"/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" android:maxSdkVersion="32"/>
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE"/>
<uses-permission android:name="android.permission.RECORD_AUDIO"/>
<uses-permission android:name="android.permission.WAKE_LOCK"/>
<uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS"/>
<uses-permission android:name="android.permission.READ_PHONE_STATE"/>
  • To enhance the security of network connections, it is recommended to disable the use of the unsecured HTTP protocol. To do this, create a file named network_security_config.xml in the res directory with the following content:
<?xml version="1.0" encoding="utf-8"?>
<network-security-config>
<base-config cleartextTrafficPermitted="false">
    <trust-anchors>
        <certificates src="system" />
    </trust-anchors>
</base-config>
</network-security-config>

Then include this XML in the AndroidManifest.xml manifest. To do this, add a reference to the created file in the application section:

<application
        android:networkSecurityConfig="@xml/network_security_config"
        ... >
</application>

# .NET

For this framework, TrueConf Mobile SDK is packaged in a NuGet package, which can be integrated using the package manager in Visual Studio. The package includes implementations for both Android and iOS platforms, as well as a common interface for cross-platform development. The libraries are built on .NET 8 (net8.0-android and net8.0-ios). Cross-platform MAUI applications are used as examples.

The minimum supported version is Android 7.0 (API 24) and iOS 13.0.

To get started with TrueConf Mobile SDK, you need to install the SDK NuGet package:

  1. Right-click on the project name.

  2. Select Add → NuGet packages.

  3. In the window that opens, from the dropdown list of package sources, select Configure Sources....

  4. In the packet sources settings, click the Add button.

  5. In the modal window for adding a source, in the Location field, select the directory that contains the TrueConfSDK.[version].nupkg file. Enter the name of the source (e.g., Mobile SDK), then click Add Source.

  6. Close the package sources settings to return to the package addition window.

  7. In the package source dropdown list in the package addition window, select the added source (for example, Mobile SDK). The list will display one package TrueConfSDK.

  8. Select the TrueConfSDK package and click Add Package.

Main Objects:

  • ITrueConfSDK - general interface;

  • TrueConfAndroidSDKImpl - implementation of the ITrueConfSDK interface for Android;

  • TrueConfIOSSDKImpl - implementation of the ITrueConfSDK interface for iOS.

# Additional steps for Android

  1. Add all permissions and features required for the SDK to the manifest (see item 3 of the Android section).

  2. Install additional NuGet packages:

<PackageReference Include="Xamarin.AndroidX.MediaRouter" Version="1.7.0.4" />
<PackageReference Include="Xamarin.AndroidX.GridLayout" Version="1.0.0.27" />
<PackageReference Include="Xamarin.AndroidX.Leanback.Preference" Version="1.0.0.27" />
<PackageReference Include="Xamarin.AndroidX.Work.Runtime" Version="2.9.0.5" />
<PackageReference Include="Xamarin.AndroidX.Emoji.Bundled" Version="1.1.0.22" />
<PackageReference Include="Xamarin.AndroidX.MultiDex" Version="2.0.1.27" />

3. Add the ProGuard obfuscator (opens new window) file with the following content:

-dontwarn android.content.**
-dontwarn android.app.**
-dontwarn android.hardware.camera2.**
-dontwarn android.util.**
-dontwarn android.provider.**

-keep class androidx.appcompat.** { *; }
-keep class androidx.startup.InitializationProvider
-keep class com.microsoft.maui.** { *; }
-keep class com.trueconf.sdk.** { *; }

# Additional steps for iOS

In iOS, you need to add "Privacy - Camera Usage Description" and "Privacy - Microphone Usage Description" to the Info.plist file with the text that will be displayed when requesting permission to use the equipment.

# Function and Event Mapping for .NET

The description of functions and events can be found in the main SDK documentation; however, their names differ:

Functions Events
iOS, Android .NET iOS, Android .NET
stop Stop onServerStatus OnServerStatusEvent
stop Stop onServerStatus OnServerStatusEvent
loginAs LoginAs onLogin OnLoginEvent
logout Logout onLogout OnLogoutEvent
callTo CallTo onStateChanged OnStateChangedEvent
joinConf JoinConf onConferenceStart OnConferenceStartEvent
hangup Hangup onConferenceEnd OnConferenceEndEvent
acceptCall AcceptCall onInvite OnInviteEvent
parseProtocolLink ParseProtocolLink onAccept OnAcceptEvent
scheduleLoginAs ScheduleLoginAs onReject OnRejectEvent
muteMicrophone MuteMicrophone microphoneMuted MicrophoneMuted
muteCamera MuteCamera cameraMuted CameraMuted
getMyId GetMyId onRejectTimeOut OnRejectTimeOutEvent
getMyName GetMyName onUserStatusUpdate OnUserStatusUpdateEvent
isConnectedToServer IsConnectedToServer onChatMessageReceived OnChatMessageReceivedEvent
isLoggedIn IsLoggedIn onRecordRequest OnRecordRequestEvent
isInConference IsInConference
getUserStatus GetUserStatus
acceptRecord AcceptRecord
sendChatMessage SendChatMessage

# Cordova

For this framework, TrueConf Mobile SDK is packaged as a Cordova plugin. The minimum supported version for Android is 7.0 (API 24), and for iOS is 13.0.

To get started, create a Cordova project by executing the command:

cordova create DIRECTORY_NAME PROJECT_PACKAGE DISPLAYED_PROJECT_NAME

Then navigate to the created folder and add the TrueConf Mobile SDK plugin using the command:

cordova plugin add PATH_TO_TRUECONF_PLUGIN

No additional actions are necessary to start using TrueConf Mobile SDK. Once the plugin is added to the project, you can obtain an instance of the SDK in js:

let sdkBuilder = cordova.require('trueconf-sdk-plugin.sdk');
  sdkBuilder.getInstance("qa.trueconf.net").then(instance => {
      sdk = instance; // save the SDK instance for further use
  }, error => {
      console.log(error);
  });

And then subscribe to and handle the onStart event:

sdk.addEventListener(“onStart”, (event) => {
      // now you can use the SDK
  });

After that, you can start receiving events and working with the SDK plugin for Cordova.

Static function for obtaining an instance of TrueConf Mobile SDK:

(static) getInstance(){Promise.<TrueConfSDK>}

Returns:

// A promise to be called after starting SDK, it gets the SDK instance.
Type - Promise.<TrueConfSDK>

The event signifies the ability to start working with TrueConf Mobile SDK:

onStart

Contains parameters:

Name Type Description
connected boolean Connection status
serverName string Server name or IP, undefined if not connected
loggedIn boolean Authorization status
userID string TrueConf ID, empty if not authorized

# Additional steps for Android

In the build.gradle file, under the repositories section, add the maven repository that contains the Android SDK libraries (as described for Android Studio). The username and password are provided upon request through your manager.

maven {
    credentials {
        username 'username'
        password 'password'
    }
    url 'https://sdk.trueconf.com/maven/repository/maven-public/'
}

Before initializing the SDK (prior to calling the start method), execute the following methods:

  • registerApp - you need to pass an Application (or its subclass used in the project) to it;

  • setFallbackActivity – pass the Activity class to it, which should be returned to when the call ends.

This can be done, for example, in the MainActivity class within onCreate:

public class MainActivity extends CordovaActivity {
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate();
        TrueConfSDK.getInstance().registerApp(getApplication());
        TrueConfSDK.getInstance().setFallbackActivity(MainActivity.class);
          ...

# React Native

For this framework, TrueConf Mobile SDK is packaged in an npm package, which can be added to the project using npm or yarn.

The minimum supported version is Android 7.0 (API 24) and iOS 13.0.

To create a project, execute the command:

npx react-native init PROJECT_NAME

Then add the SDK module using npm or yarn:

npm install PATH_TO_TRUECONF_MODULE --install-links=true

or

yarn add PATH_TO_TRUECONF_MODULE

# Additional steps for iOS

To connect the SDK module via CocoaPods, run the command from the project directory:

cd ios && pod install && cd ..

Add camera and microphone permissions to Info.plist directly in the Xcode project, or by executing the following commands from the project folder:

cd ios/PROJECT_NAME
plutil -insert NSCameraUsageDescription -string '' Info.plist
plutil -insert NSMicrophoneUsageDescription -string '' Info.plist

# Additional steps for Android

In build.gradle (in Project:Example), add the maven repository containing the Android SDK libraries to the repositories section for all projects (as for Android Studio). username and password are provided upon request through your manager.

maven {
    credentials {
        username 'username'
        password 'password'
    }
    url 'https://sdk.trueconf.com/maven/repository/maven-public/'
}

Before initializing the SDK (before calling the start method), it is necessary to call the following methods:

  • registerApp - you need to pass an Application (or its subclass used in the project) to it;

  • setFallbackActivity - you need to pass the Activity class to it, to which the application should return upon the call completion.

This can be done, for example, in the MainApplication class in onCreate:

public class MainApplication extends Application implements ReactApplication {
    @Override
    public void onCreate() {
        super.onCreate();
        TrueConfSDK.getInstance().registerApp(this);
        TrueConfSDK.getInstance().setFallbackActivity(MainActivity.class);
          ...