Skip to main content

Installation

Install the SDK using pub.dev.

flutter pub add dyte_core

Android

info

The below instructions are for the release builds, debug builds should work without any additional steps.

  1. Create / append to the file android/app/proguard-rules.pro
# Keep `Companion` object fields of serializable classes.
# This avoids serializer lookup through `getDeclaredClasses` as done for named companion objects.
-if @kotlinx.serialization.Serializable class **
-keepclassmembers class <1> {
static <1>$Companion Companion;
}

# Keep `serializer()` on companion objects (both default and named) of serializable classes.
-if @kotlinx.serialization.Serializable class ** {
static **$* *;
}
-keepclassmembers class <2>$<3> {
kotlinx.serialization.KSerializer serializer(...);
}

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

# keep ktor classes
-keep class io.ktor.** { *; }
  1. 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'
}
}

iOS

caution

Please make sure you are running Xcode using Rosetta on the newer Apple Silicon based Macs.

iOS minimum version 12.0

We support minimum OS version 12.0 for our iOS SDK.

  1. Open your podfile and make sure your platform is set to ios 12
platform :ios, '12.0'
  1. Add the fonts and permission entries in 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/>
  1. Ensure in your Podfile you have an entry like below declaring platform of 11.0 or above and disable BITCODE.
post_install do |installer|
installer.pods_project.targets.each do |target|
target.build_configurations.each do |config|
config.build_settings['ENABLE_BITCODE'] = 'NO'
end
end
end