Skip to main content

Quickstart

Get the roomName for the meeting and the participant's authToken from our backend APIs (read more about our server APIs here), and pass them to Dyte's client SDK.

There are 2 ways to manage a meeting view:

  1. Programatically
  2. Using Storyboard

Programatically

import UIKit
import DyteSdk;

class ViewController: UIViewController {
@IBOutlet weak var videoButton: UIButton?

override func viewDidLoad() {
super.viewDidLoad()
// Do any additional setup after loading the view.
}

@IBAction func joinMeeting(_ sender: Any) {
let config = DyteMeetingConfig();
meetingConfig.roomName = "YOUR_ROOM_NAME";
meetingConfig.authToken = "YOUR_AUTH_TOKEN";
let dyteView = DyteMeetingView(frame: CGRect(x: 0, y: 0, width: self.view.bounds.size.width, height:self.view.bounds.size.height ))
self.view.addSubview(dyteView)
dyteView.join(config);
}
}

Using Storyboard

  1. Add a View in Storyboard and set it's custom class to DyteMeetingView. Similar to above example, if you want to use tag, you can set that too in Storyboard.

xcode-screenshot-showing-storyboard-setup

  1. Reference the view in your code and initiate the meeting.
import UIKit
import DyteSdk;

class ViewController: UIViewController {
@IBOutlet weak var videoButton: UIButton?

override func viewDidLoad() {
super.viewDidLoad()
// Do any additional setup after loading the view.

let config = DyteMeetingConfig();
meetingConfig.roomName = "YOUR_ROOM_NAME";
meetingConfig.authToken = "YOUR_AUTH_TOKEN";
let dyteView = self.view as DyteMeetingView
dyteView.join(config)
}
}