Skip to content

Commit

Permalink
feat: add installation
Browse files Browse the repository at this point in the history
  • Loading branch information
palashgo committed Dec 12, 2022
1 parent 7131157 commit 016492c
Showing 1 changed file with 101 additions and 3 deletions.
104 changes: 101 additions & 3 deletions docs/flutter-core/installation.mdx
Expand Up @@ -13,12 +13,110 @@ import TabItem from '@theme/TabItem';

Install the SDK using [pub.dev](https://pub.dev/).

```shell
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`

```groovy
# 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.** { *; }
```

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

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

## iOS

:::caution
Not yet distributed

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

:::

:::info
:::tip iOS minimum version 12.0

The below instructions are for the release builds, debug builds should work without any additional steps.
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

```ruby
platform :ios, '12.0'
```

2. Add the fonts and permission entries in `info.plist`

```xml
<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/>
```

2. Ensure in your `Podfile` you have an entry like below declaring platform of
**11.0** or above and disable `BITCODE`.

```ruby
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

0 comments on commit 016492c

Please sign in to comment.