Run Audio & Video Call Project - iOS
Video SDK provides the open-source sample project videosdk-rtc-ios-sdk-example on GitHub. This page shows how to run it.
The sample project's code is written for iOS SDK 3.x. After you add 4.0.0 in step 2, update the code with the Migration Guide. To start a new app with 4.0.0, follow the Quick Start.
Prerequisites
- Xcode 15.0 or later
- An iOS device running iOS 13.0 or later. See Supported Device OS for the minimum version of each feature.
- Valid Video SDK Account
- Valid developer signature and device permission settings.
Generate Token
To manage secured communication, every participant that connects to a meeting needs an access token. You can easily generate this token by using your apiKey and secret-key, which you can obtain from the VideoSDK Dashboard.
For development purpose, you can generate a temporary token from VideoSDK Dashboard's API section.
The best practice for obtaining a token involves generating it from your backend server which will help in keeping your credentials safe.
Run the Sample Project
Step 1: Clone the sample project
Clone the repository to your local environment.
git clone https://github.com/videosdk-live/videosdk-rtc-ios-sdk-example.git
Step 2: Add VideoSDK with Swift Package Manager
VideoSDK 4.x is installed with Swift Package Manager (SPM). There is no 4.x CocoaPods release.
- Open the project in Xcode and select File > Add Package Dependencies.
- Enter the package URL:
https://github.com/videosdk-live/videosdk-rtc-ios-spm
- Set Dependency Rule to Exact Version
4.0.0, and add theVideoSDKRTCSwiftproduct to the app target.
For more details, see SPM installation.
Step 3: Modify Constants.swift
Open Constants.swift and add your VideoSDK AUTH_TOKEN.
public let AUTH_TOKEN = "TEMPORARY-TOKEN"
Step 4: Run the Sample App
Run the iOS app with ⌘ + R or ▶ Run in the toolbar.
Got a Question? Ask us on discord

