Swift Package, with the public module name SMeeting. It currently supports:
- iOS 16.0 and later
- macOS 14.0 and later
- Xcode 15 and later
- Swift 5.9 and later
SMeeting, SRTC is resolved along with it as a dependency, so you don’t need to add it separately.
There are two SMeeting SDKs for Apple platforms—first confirm which one you need. This section covers the native Swift SDK (
import SMeeting, delivered as a Swift Package, supporting both iOS and macOS); there is also an Objective-C MeetingKit (distributed via CocoaPods, iOS only), see iOS SDK (Chinese).For new projects, we recommend the Swift SDK in this section. The two APIs can’t be mixed, and you shouldn’t add both to the same project.Integrate with Swift Package Manager
The SDK is distributed as a precompiled XCFramework containing three platform slices: iOS device, iOS simulator, and macOS. The meeting layer is built on top of the audio and video layer, but you only need to declare one dependency—SPM resolves the underlying SRTC and WebRTC automatically.Declare it in Package.swift
Add it in an Xcode project
If you use an Xcode project rather than a pure SPM project:- Open
File > Add Package Dependencies... - Enter
https://github.com/seastart/smeeting-swift-sdk.git - Check
SMeetingfor your target
Exception: iOS full-screen sharing needs one more dependency
You need this step only for iOS full-screen screen sharing (sharing the entire system screen, not just your app’s content). The extension must linkSRTCBroadcastKit—the second product of the audio and video layer’s srtc-swift-sdk (it doesn’t include WebRTC)—and because SwiftPM doesn’t allow using products of transitive dependencies, you must declare it explicitly:
exact: to guarantee a combination we have tested); you can find the mapping in the Changelog (Chinese).
Import the SDK
SMeetingEngine, MeetingCreateReq, MeetingUserInfo, SMeetingDelegate, etc.) are all in the SMeeting module.
The following types come from the underlying SRTC module and require an extra import when you use them:
Permissions
iOS
Add the following toInfo.plist:
On iOS, the SDK requests microphone permission when you enter the meeting, even if the member only intends to listen; the orange microphone indicator also shows in the status bar while in the meeting. This is a prerequisite for controllable audio routing and matches apps such as Zoom and Tencent Meeting; for the reason, see Audio routing (Chinese). So
NSMicrophoneUsageDescription is required—the app crashes without it.macOS
Add the following toInfo.plist:
- On macOS, sharing a display or an app window requires the user to grant permission in a system prompt
- The APIs that specify a sharing source require macOS 12.3 or later; for details, see Screen sharing (Chinese)
Minimum integration checklist
SMeetinghas been added to your target’s dependencies- Usage descriptions for camera / microphone (and screen recording) permissions are configured
- Your backend can issue the meeting token needed to log in to the SDK
- Your UI has areas ready for local video and remote video