This app demonstrates the basic usage of LiveKit Swift SDK (iOS/macOS). See LiveKit Docs for more information.
Precompiled macOS version is available from the Releases page, so you can quickly try out features of the LiveKit Swift SDK or the LiveKit Server.
Precompiled iOS version can be downloaded on Apple TestFlight. Click on the link from an iOS device and follow the instructions.
- Clone this LiveKit Swift Example repo.
- Open
LiveKitExample.xcodeproj
(not the-dev.xcworkspace
). - Wait for packages to sync.
- Select the
LiveKitExample
project from the left Navigator. - For each Target, select Signing & Capabilities tab and update your Team and Bundle Identifier to your preference.
- Select
LiveKitExample (iOS)
orLiveKitExample (macOS)
from the Scheme selector at the top of Xcode. - Run the project from the menu Product → Run or by ⌘R.
If you encounter code signing issues, make sure you change the Team and bundle id from the previous step.
- Prepare & Start LiveKit Server. See the Getting Started page for more information.
- Generate an access token.
- Enter the Server URL and Access token to the example app and tap Connect.
Server URL would typically look like ws://localhost:7880
depending on your configuration. It should start with ws://
for non-secure and wss://
for secure connections.
iOS/macOS will ask you to grant permission when enabling Camera, Microphone and/or Screen Share. Simply allow this to continue publishing the track.
Open Settings → Security & Privacy → Screen Recording and make sure LiveKitExample has a ✔️ mark. You will need to restart the app.
If you get package syncing errors, try resetting your package caches by right clicking Package Dependencies and choosing Reset Package Caches from the Navigator.
Please join us on Slack to get help from our devs / community members. We welcome your contributions(PRs) and details can be discussed there.
For development, open LiveKitExample-dev.xcworkspace
instead. This workspace will compile with the local ../client-sdk-swift
.