Skip to main content

How to use Diyalog IOS SDK

Diyalog SDK is used for enabling messaging for your application. It is a multi-platform communication Messaging SDK for mobile and web. It is easy to integrate, save development cost and delight users with a stable, secure and customization messaging.

SDK Supports#

Diyalog SDK supported with iOS 10.0 & Above

Integration Steps#

Step 1: Adding DiyalogEngine to your project

You need to add DiyalogEngine and their dependencies j2objc, webrtc and opus frameworks to your project.
DiyalogEngine framework and its dependencies started to be published as xcframework. You need to add it to your project as Xcframework.
The dependent j2objc should not be embedded in the application package. This framework is required for your application to be compiled with DiyalogEngine. Other WebRTC and opus frameworks must be embed.

You have 3 choices to add DiyalogEngine framework and dependency frameworks to your project.

  • Using Carthage

    Create or add your Cartfile with following lines of dependency definitions

    binary "" == version-no

    *version-no : You should be update with current stable version number.

    Other Dependencies :

    binary "" == 1.1.2941
    binary "" == 1.0.3
    binary "" == 1.3

    then update carthage of your project by following command.

    carthage update --use-xcframeworks
  • Using CocoaPods

    The following dependencies need to be added to your PodFile file.

    pod 'DiyalogEngine', :git => '', :tag => '*version-no'
    pod 'j2objc', :git => '', :tag => '1.0.3'
    pod 'WebRTC', :git => '', :tag => '1.1.2941'
    pod 'opus', :git => '', :tag => '1.3'

    *version-no : You should be update with current stable version number.

    In addition, please add following script to the end of your podfile after replacing Your-Target-Name with your project target name.

    post_install do |installer|
    installer.pods_project.targets.each do |target|
    if == "Pods-**Your-Target-Name**"
    target.build_configurations.each do |config|
    xcconfig_path = config.base_configuration_reference.real_path
    xcconfig =
    xcconfig.sub!('-framework "j2objc"', ''), "w") do |file|
    file << xcconfig

    then run pod install command in your project.

    pod install

Step 2: Need to make required changes in Capabilities of the project as below:


And also background mode


Step 3: In your Project, open AppDelegate.swift file and import DiyalogEngine framework. Add override init() method, Inside that method set below code.

import UIKit
import DiyalogEngine
class AppDelegate: UIResponder, UIApplicationDelegate {
var window: UIWindow?
override init(){
DiyalogEngine.diyalogInstance().endpoints = ["wss://<YOUR_DIYALOG_SERVER>"]
//Diyalog Test App
DiyalogEngine.diyalogInstance().apiId = <YOUR_APP_API_ID>
DiyalogEngine.diyalogInstance().apiKey = "<YOUR_APP_API_KEY>"
DiyalogEngine.diyalogInstance().trustedKeys = [

Now you are ready to use Diyalog SDK in your application. You should read the next section about configuration parameters. Diyalog SDK gives you many customization in the chat views. You can learn details about styling Diyalog in styling document.