Swift Package, with the public module name SRTC. It currently supports:
- iOS 16.0 and later
- macOS 14.0 and later
- Xcode 15 and later
- Swift 5.9 and later
There are two SRTC SDKs for Apple platforms—confirm which one you need first. This section covers the native Swift SDK (
import SRTC, distributed as a Swift Package, supporting both iOS and macOS); there is also an Objective-C RTCEngineKit (distributed via CocoaPods, iOS only)—see iOS SDK (Chinese).For new projects, we recommend the Swift SDK described here. The two APIs can’t be mixed, and don’t include both in the same project.Integrate with Swift Package Manager
The SDK is distributed as a prebuilt XCFramework containing slices for three platforms: iOS devices, the iOS Simulator, and macOS.Declare it in Package.swift
Add it in Xcode
If you use an Xcode project instead of a pure SPM project:- Open
File > Add Package Dependencies... - Enter
https://github.com/seastart/srtc-swift-sdk.git - Select
SRTCfor your target
SRTCBroadcastKit (only for full-screen screen sharing on iOS)
The same package also contains anSRTCBroadcastKit product. It is used only by the Broadcast Upload Extension for iOS screen sharing;
regular integrations don’t need it. For integration steps, see Screen sharing (Chinese).
Import the SDK
Configure permissions
iOS
Add the following toInfo.plist:
macOS
The app’sInfo.plist also needs:
- macOS screen sharing is based on
ScreenCaptureKit - Sharing a window or display requires the user to grant permission in a system prompt
- Capturing system audio requires newer system capabilities—see Screen sharing (Chinese)
Minimal integration checklist
SRTChas been added to your target’s dependencies- Camera / microphone permission strings are configured
- Your backend can already issue the token needed to join a channel
- Your UI has a local preview area and a remote video area ready