.package(name: "StreamWebRTC", url: "https://github.com/GetStream/stream-video-swift-webrtc.git", .exact("114.5735.8")),
.package(url: "https://github.com/apple/swift-protobuf.git", from: "1.18.0")
Installation
The Swift SDK can be installed using Swift Package Manager, if you are starting a new project we always recommend using the latest release. Releases and changes are published on the Github releases page.
We also provide pre-built XCFramework support, read more here.
Add the SDK to your project
To add StreamVideo
SDK, open Xcode and follow these steps:
- In Xcode, go to File -> “Add Packages…”
- Paste the URL https://github.com/GetStream/stream-video-swift.git
- In the option “Dependency Rule” choose “Branch,” in the single text input next to it, enter “main”
- Choose “Add Package” and wait for the dialog to complete.
- Select
StreamVideo
andStreamVideoSwiftUI
(if you use SwiftUI, otherwise also selectStreamVideoUIKit
).
➤ Do you want to use XCFrameworks? (Click to read more)
Our XCFrameworks are built with Swift 5.9. In order to use them you need Xcode 15 or above
You can learn more about our Module Stable XCFrameworks here
Permissions
Making a video call requires the usage of the camera and the microphone of the device. Therefore, you need to request permissions to use them in your app. In order to do this, you will need to add the following keys and values in your Info.plist
file.
Privacy - Camera Usage Description
- “Your_app_name requires camera access in order to capture and transmit video”
Privacy - Microphone Usage Description
- “Your_app_name requires microphone access in order to capture and transmit audio”
Push notifications
Stream video support both Remote Notifications and VoIP notifications. See the Push Notification section for more details.
XCFrameworks
In an effort to have Module Stability, we distribute pre-built XCFrameworks.
Our XCFrameworks are built with Swift 5.9. In order to use them you need Xcode 15 or above.
An XCFramework is a package that contains binaries for multiple architectures/platforms, but only the particular slice of that package required for your architecture/platform will be used.
Benefits of XCFrameworks:
- Conveniently import a single package
- Supports all platforms and architectures
- No more fat binaries. No more architectures stripping
In order to manually integrate StreamVideo XCFrameworks, you need to add the additional dependencies to your project.