Installation

Installation

Install our React Native dependency from npm

npm install -S @dytesdk/mobile

or

yarn add @dytesdk/mobile

Also install external dependencies required by our SDK

npm install -S react-native-webview react-native-webrtc @react-native-async-storage/async-storage react-native-vector-icons

or

yarn add react-native-webview react-native-webrtc @react-native-async-storage/async-storage react-native-vector-icons

Common

At root of your project, add this

import { registerGlobals } from 'react-native-webrtc';

registerGlobals();

iOS

Add the following in your info.plist

<key>UIAppFonts</key>
    <array>
        <string>MaterialCommunityIcons.ttf</string>
        <string>MaterialIcons.ttf</string>
    </array>
    <key>NSBluetoothPeripheralUsageDescription</key>
    <string>We will use your Bluetooth to access your Bluetooth headphones.</string>
    <key>NSBluetoothAlwaysUsageDescription</key>
    <string>We will use your Bluetooth to access your Bluetooth headphones.</string>
    <key>NSCameraUsageDescription</key>
    <string>For people to see you during meetings, we need access to your camera.</string>
    <key>NSMicrophoneUsageDescription</key>
    <string>For people to hear you during meetings, we need access to your microphone.</string>
    <key>NSPhotoLibraryUsageDescription</key>
    <string>For people to share, we need access to your photos.</string>
  <key>UIViewControllerBasedStatusBarAppearance</key>
  <false/>

📘

For Dyte's react native version <=0.0.9

You would need to use the following font families instead, on iOS, for Dyte's react native plugin versions 0.0.9 or lower.

<key>UIAppFonts</key>
    <array>
        <string>Octicons.ttf</string>
        <string>MaterialIcons.ttf</string>
        <string>Ionicons.ttf</string>
        <string>Entypo.ttf</string>
    </array>

Android

( Following instructions are only for the release builds, debug builds don't need any additional steps )

Edit your android/gradle.properties and add the following line

android.enableDexingArtifactTransform.desugaring=false

Create / append to the file android/app/proguard-rules.pro

-keep class org.webrtc.** { *; }
-dontwarn org.chromium.build.BuildHooksAndroid

In your android/app/build.gradle edit the release configuration and add the following line importing the proguard configuration

buildTypes {
        release {
            ...
            ...
            ...
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }