Business Messaging Guide v2
Business Messaging
Version 2

Install Chat SDK for Business Messaging

Copy link

Sendbird Business Messaging utilizes our core Chat SDKs to implement Business Messaging in a way that is more specific to your application. This guide walks you through the necessary steps required in order to successfully install the SDK for your preferred platform.

Note: The Sendbird server supports Transport Layer Security (TLS) from version 1.0 up to 1.3. For example, in the server regions where TLS 1.3 isn't available, lower versions, sequentially from 1.2 to 1.0, will be supported for secure data transmission.


Before you start

Copy link

Before install the Chat SDK of Sendbird Business Messaging, it is assumed you already have the following:

  • A Sendbird account on Sendbird Dashboard
  • A Sendbird Application in a region that supports Business Messaging

Note: Sendbird Business Messaging are currently only supported in the following regions: Singapore, N. Virginia, Oregon, Frankfurt, Mumbai


Installing the Chat SDK is simple if you're familiar with using external libraries or SDKs in your projects. Sendbird Chat SDK can be installed through either one of the package managers:

If you don't want to use a package manager, check out the manual installation guide.

Note: The name of the framework and the module is SendbirdChatSDK while the main class in the SDK is called SendbirdChat.

Requirements

Copy link

The minimum requirements for the Chat SDK for iOS are the following:

  • macOS
  • Xcode 15.0 or later
  • At least one device running iOS 12.0 or later
  • Swift 5.0 and later or Objective-C

Note: Starting on April 29, 2024, you must build and test your app with Xcode 15.0 or later to submit to the App Store. You can use the existing Sendbird SDK versions built with both Xcode 13.x and Xcode 14.x but Sendbird is repackaging Chat for iOS with Xcode 15.0 and minimum iOS version of 12.0 starting on April 29, 2024.

  1. Open Xcode, go to your projects General settings tab and select your project under Project in the left column.
  2. Go to the Swift packages tab and click the + button.

  1. When a pop-up appears, enter the following github repository address in the search bar: https://github.com/sendbird/sendbird-chat-sdk-ios

  1. Set Rules and click Next.

  1. Check SendbirdChatSDK in the Package product column and click Finish. This will establish a Swift Package Dependency menu in Xcode.

CocoaPods

Copy link
  1. Open a terminal window, move to your project directory, and then create a Podfile by running the following command.
$ pod init
  1. A Podfile will be created in your project folder. Open the Podfile and modify the file like the following.
platform :ios, '12.0'

target 'YOUR_PROJECT_NAME' do
    # Comment out the next line if you don't want to use dynamic frameworks.
    use_frameworks!

    # Pods for YOUR_PROJECT_NAME.
    pod 'SendbirdChatSDK', '~> 4.0.0'
end
  1. Then install the SendbirdChatSDK framework by running the following command in the same terminal window.
$ pod install
  1. In the folder, you will see a new project file in the .xcworkspace format. Now you can build your project with the SendbirdChatSDK framework in the file.

Carthage

Copy link
  1. Open a terminal window and add the following line to create a Cartfile in your project folder.
$ touch Cartfile
  1. Move to your project directory, open the Cartfile, and add the following line to your Cartfile.
github "sendbird/sendbird-chat-sdk-ios"
  1. Run the carthage update command to download Sendbird Chat SDK for iOS.
$ carthage update --use-xcframeworks
  1. Once the update is complete, go to your Xcode project's General settings tab. Then, open the <YOUR_XCODE_PROJECT_DIRECTORY>/Carthage/Build/iOS in the Finder window and drag and drop the SendbirdChatSDK.xcframework folder to the Frameworks, Libraries, and Embedded section in Xcode.

  1. Once you're done with package installation, go to the Usage guide and see the implementation process of the SDK.

Android

Copy link

Requirements

Copy link

The minimum requirements for Chat SDK for Android are the following.

  • Android 5.0 (API level 21) or higher
  • Java 8 or higher
  • Android Gradle plugin 3.4.2 or higher
  • Sendbird Chat SDK for Android 4.16.0 and later

Installation

Copy link

The installation method is determined by your gradle version. If you're utilizing gradle 6.8 or higher, add the following code to your settings.gradle file. Otherwise, add the following code to your root build.gradle file. See this release note to learn more about updates to Gradle.

Gradle 6.8 or higherGradle 6.7 or lower
// Add the following to your settings.gradle file.

dependencyResolutionManagement {
    repositories {
        maven { url "https://repo.sendbird.com/public/maven" }
    }
}

Next, for all Gradle versions, add the dependency to your module build.gradle file.

dependencies {
    implementation 'com.sendbird.sdk:sendbird-chat:4.14.0'
}

Request to access system permissions

Copy link

The Chat SDK requires system permissions that allow it to communicate with the Sendbird server as well as read and write to and from the user's device's storage. To request the system permissions, add the following line to your AndroidManifest.xml file:

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

(Optional) Configure ProGuard

Copy link

If you're building your APK with minifyEnabled true, add the following line to the module's ProGuard rules file:

-dontwarn com.sendbird.android.shadow.**

SDK implementation

Copy link

Once you're done with package installation, go to the Usage guide and see the implementation process of the SDK.


JavaScript

Copy link

Installation

Copy link

When using Sendbird Business Messaging with the JavaScript SDK, it's assumed you're also using a mobile framework such as React Native.

Install the JavaScript SDK via npm or yarn using the following command.

npmyarn
npm install --save @sendbird/chat

The Chat SDK has type definition files that include third-party library dependencies such as @react-native-async-storage/async-storage to provide accurate type support.

If you do not use such third-party libraries or prefer not to check the types of the Chat SDK when compiling, enable the skipLibCheck option in your tsconfig.json file.

// your tsconfig.json
{
  "compilerOptions": {
    "skipLibCheck": true
  }
}

SDK implementation

Copy link

Once you're done with package installation, go to the Usage guide and see the implementation process of the SDK.


Flutter

Copy link

Requirements

Copy link

The minimum requirements for the Chat SDK for Flutter are the following:

  • Dart 2.19.0 or later
  • Flutter 3.7.0 or later

Installation

Copy link

Add the Chat SDK to the dependency list of your packages pubspec.yaml.

dependencies:
  sendbird_chat_sdk: ^4.0.0

Then, install the package from the command line.

flutter pub get

SDK implementation

Copy link

Once you're done with package installation, go to the Usage guide and see the implementation process of the SDK.