Skip to main content
The Daily Client SDK for iOS is a native Swift library built on WebRTC. It handles media negotiation, network traversal, and participant management so you can focus on building your UI.

Quickstart

Build a working video call app step by step

Screen sharing

Add screen share to your iOS app

API reference

Full Swift API docs

Hello, world

Add the SDK via Swift Package Manager (https://github.com/daily-co/daily-client-ios.git), then join a call:
import Daily

class CallViewController: UIViewController {
    let call: CallClient = .init()
    var videoViews: [ParticipantId: VideoView] = [:]

    override func viewDidLoad() {
        super.viewDidLoad()
        call.delegate = self

        call.join(url: URL(string: "https://your-domain.daily.co/room-name")!) { result in
            switch result {
            case .success: print("Joined!")
            case .failure(let error): print("Error: \(error)")
            }
        }
    }

    @IBAction func didTapTurnOffCamera(_ sender: UIButton) {
        call.setInputEnabled(.camera, false)
    }
}

extension CallViewController: CallClientDelegate {
    func callClient(_ callClient: CallClient, participantJoined participant: Participant) {
        guard !participant.info.isLocal else { return }
        let videoView = VideoView()
        videoViews[participant.id] = videoView
        addVideoViewToMyUI(view: videoView)
        videoView.track = participant.media?.camera.track
    }

    func callClient(_ callClient: CallClient, participantUpdated participant: Participant) {
        videoViews[participant.id]?.track = participant.media?.camera.track
    }

    func callClient(_ callClient: CallClient, participantLeft participant: Participant, withReason reason: ParticipantLeftReason) {
        videoViews.removeValue(forKey: participant.id)
    }
}

API structure

The SDK is organized around the tasks involved in building a call. For each task you get properties/methods to update state, properties to get current state, and delegate callbacks via CallClientDelegate to react to changes.

Call lifecycle

join(), leave(), callState, callClient(_:callStateUpdated:)

Participants

participants(), participantJoined, participantUpdated, participantLeft

Media inputs

updateInputs(), setInputEnabled(), callClient(_:inputsUpdated:)

Publishing

updatePublishing(), setIsPublishing(), callClient(_:publishingUpdated:)

Subscriptions

updateSubscriptions(), updateSubscriptionProfiles(), setSubscriptionState()

Active speaker

activeSpeaker, callClient(_:activeSpeakerChanged:)

Resources

Demo app

A complete working example on GitHub

Starter kit

Production-ready boilerplate from Daily’s engineering team

Requirements

  • iOS deployment target >= 13.0
  • Xcode 13 or later