Integrate VideoSDK Using Swift Package Manager (SPM) - iOS
VideoSDK iOS SDK 4.x is published as a Swift package. Below are the steps to install it in your iOS app with Swift Package Manager (SPM).
- There is no 4.x CocoaPods release. If your app installs 3.x with CocoaPods, remove
pod 'VideoSDKRTC'from your Podfile and runpod installbefore you add the package.
Step 1: Copy the below package link.
https://github.com/videosdk-live/videosdk-rtc-ios-spm
Step 2: Navigate to your Xcode project.
Now select File > Add Package Dependencies… in the menu bar.

Step 3: Add Package
-
Paste the above package link into the search bar.
-
Set Dependency Rule to Exact Version and enter
4.0.0. -
Click Add Package. When Xcode asks which package products to add, add
VideoSDKRTCSwiftto your app target. -
After the package is added successfully, it is shown in the Project navigator under Package Dependencies.
If you declare dependencies in a Package.swift file instead, add the package and product like this:
.package(url: "https://github.com/videosdk-live/videosdk-rtc-ios-spm.git", exact: "4.0.0")
// in your target's dependencies
.product(name: "VideoSDKRTCSwift", package: "videosdk-rtc-ios-spm")
If your project already uses this package with a rule from the 3.x install steps, such as Branch main or Up to Next Major Version, change the rule to Exact Version 4.0.0. An Up to Next Major Version rule from 3.x never selects 4.0.0.
Step 4: Add permission to use microphone and camera. Insert the following lines in info.plist
<key>NSCameraUsageDescription</key>
<string>Allow camera access to start video.</string>
<key>NSMicrophoneUsageDescription</key>
<string>Allow microphone access to start audio.</string>
Step 5: Import package
Import the package into your project files using import VideoSDKRTC to start using the VideoSDK package. The package product is VideoSDKRTCSwift, but the module you import is VideoSDKRTC.

Got a Question? Ask us on discord

