Skip to main content

iOS Core SDK Quickstart

This quickstart shows how to use Dyte's iOS Core SDK to add live video and audio to your iOS applications.

For getting started quickly, you can use our sample code. You can clone and run a sample application from the iOS Core SDK GitHub repository.


You'll learn how to:

  • Install the Dyte SDK
  • Initialize the SDK
  • Configure a Dyte meeting
  • Initialize the Dyte meeting
  • Go live with your Dyte meeting!

Before Getting Started

Step 1: Install the SDK

  1. Set your platform to iOS 13.0 or above in your Podfile.
platform :ios, '13.0'
  1. Add 'DyteiOSCore' to your Podfile.
pod 'DyteiOSCore' 
  1. Install the client SDK from pod.
pod install
  1. Add the following entries to the info.plist file. This gives permission to your app to access the camera and microphone, access photos, install the required fonts and icons.
<string>We will use your Bluetooth to access your Bluetooth headphones.</string>
<string>We will use your Bluetooth to access your Bluetooth headphones.</string>
<string>For people to see you during meetings, we need access to your camera.</string>
<string>For people to hear you during meetings, we need access to your microphone.</string>
<string>For people to share, we need access to your photos.</string>

The UIBackgroundModes key is used in the Info.plist file of an iOS app to declare the app's supported background execution modes. This key is an array of strings that specifies the types of background tasks that the app supports. By declaring the background modes, the app can continue to run in the background and perform specific tasks even when it is not in the foreground. It's important to note that the use of background modes should be justified and comply with Apple's App Store Review Guidelines. Apps that misuse background modes or unnecessarily run in the background may be rejected during the app review process.

Sources: Apple Developer Documentation: Declaring Your App's Supported Background Tasks

Step 2: Initialize the SDK

  1. The DyteMobileClient is the main class of the SDK. It is the main entry point of the SDK. It is the only class that you need to instantiate in order to use the SDK. To instantiate DyteMobileClient, you should use DyteiOSClientBuilder().build().
let meeting = DyteiOSClientBuilder().build()
  1. Add the required listeners and implement callback stubs as per requirement
meeting.addMeetingRoomEventsListener(meetingRoomEventsListener: self)
meeting.addParticipantEventsListener(participantEventsListener: self)
meeting.addSelfEventsListener(selfEventsListener: self)
meeting.addParticipantEventsListener(participantEventsListener: self)
meeting.addChatEventsListener(chatEventsListener: self)
meeting.addPollEventsListener(pollEventsListener: self)
meeting.addRecordingEventsListener(recordingEventsListener: self)
meeting.addWaitlistEventListener(waitlistEventListener: self)
meeting.addLiveStreamEventsListener(liveStreamEventsListener: self)

Step 3: Set the properties in the DyteMeetingInfo class

Add authToken that you got from the REST API to constructor of DyteMeetingInfoV2 - Add Participant API

authTokenToken from Add Participant API
(The presetName created earlier
must be passed in the body
of the Add Participant API request)
The API response contains the authToken.
let meetingInfo = DyteMeetingInfoV2(authToken: authToken,
enableAudio: true,
enableVideo: true,
baseUrl: "")

Step 4: Initialize the connection request

To initialize the connection request, call the doInit() method obtained on meeting with the meetingInfo argument. This will establish the connection with the Dyte meeting server.

meeting.doInit(dyteMeetingInfo_: meetingInfo)

Note: This is the asynchronous method, You will have to attached observer (meeting.addMeetingRoomEventsListener(meetingRoomEventsListener: self) ) to know its completion state, success or failure, Listen to below callbacks of 'DyteMeetingRoomEventsListener'.

func onMeetingInitCompleted() {

func onMeetingInitFailed(exception: KotlinException) {


To initialize the connection request, call the doInit(dyteMeetingInfo: DyteMeetingInfoV2, onInitCompleted: () -> Void, onInitFailed_: () -> Void) method which is asynchronous and callback based.

Step 5: Connect to the meeting

Now, you have established the connection with the Dyte meeting server successfully. Once onMeetingInitCompleted() is triggered, next step is to join the room.

Join the room

To join the meeting room, do the following only after you received the doInit completion callbacks.

func onMeetingInitCompleted() {


 meeting.doInit(dyteMeetingInfo: meetingInfo) {
self.meeting.joinRoom {
print("Room Joined successfully")
} onRoomJoinFailed: {
print("Room Joined failed")
} onInitFailed_: {
print("Meeting Initialisation got failed")

Join room event listeners: Once you call joinRoom(), you can listen to callbacks for this action on meeting object if you have done meeting.addSelfEventsListener(selfEventsListener: self).

extension MeetingViewModel: DyteSelfEventsListener {
func onMeetingRoomJoinStarted() {
// meeting join started

func onMeetingRoomJoined() {
// meeting room joined successfully

func onMeetingRoomJoinFailed(exception: KotlinException) {
// error in joining meeting room.

Leave the room

Once the meeting is over, you can leave the meeting room. To leave the meeting call leaveRoom() on meeting object.


Leave room event listeners: You can listen to leaveRoom() callbacks by registering obsever on meeting object as follows:

extension MeetingViewModel: DyteSelfEventsListener {
func onMeetingRoomLeaveStarted() {
// meeting room leave started

func onMeetingRoomLeft() {
// meeting room leave completed