📡 HaishinKit for iOS, macOS, tvOS, visionOS and Android.
A Swift SDK for capturing, composing, publishing, and playing live audio and video on iOS, macOS, tvOS, and visionOS. In development since 2015.
See the support guide for bug reports, questions, and paid development. GitHub Sponsors lists current sponsorship benefits and helps fund maintenance and streaming compatibility testing.
- Check your setup. HaishinKit 2.3.x requires iOS 15 or later and Xcode 26 or later. See the requirements for other platforms and versions.
- Try the iOS example. Check out release 2.3.2, open
Examples/Examples.xcworkspace, and run theExample iOSscheme on an iPhone running iOS 16 or later. If Xcode reports a signing error, choose your own team and a unique bundle identifier in Signing & Capabilities. In the example, enter your provider'srtmps://ingest URL in URL and the stream key in Name. If the URL already includes the key, leave Name empty. - Add it to your app. Use Swift Package Manager and add the
HaishinKitandRTMPHaishinKitproducts to your app target. See the RTMP publish example for 2.3.2 and the camera and microphone prerequisites.
What has been tested? The streaming compatibility report records the SDK revision, test setup, and whether the receiver decoded video and audio. The Cloudflare Stream RTMPS-to-HLS result comes from a short macOS test, not an iPhone test or a reconnect test.
- Optional AV1 codec (development): AOMHaishinKit offers standalone software encoding/decoding and encoder statistics. Register its factory for Enhanced RTMP publishing and software playback fallback (8-bit SDR).
- Protocols ✨Publish and playback feature are available RTMP, SRT and WHEP/WHIP(alpha).
- Multi Camera access ✨Support multitasking camera access.
- Multi Streaming ✨Allowing live streaming to separate services. Views also support this, enabling the verification of raw video data.
- Strict Concurrency ✨Supports Swift's Strict Concurrency compliance.
- Optional codecs (development) VPXHaishinKit provides software VP8/VP9 conversion and registered Enhanced RTMP publishing/playback (8-bit SDR).
- Screen Capture ✨Supports ReplayKit(iOS) and ScreenCaptureKit(macOS) api.
- Video mixing ✨Possible to display any text or bitmap on a video during broadcasting or viewing. This allows for various applications such as watermarking and time display.
| Version | Xcode | Swift |
|---|---|---|
| 2.3.0+ | 26.0+ | 6.0+ |
| 2.2.x | 26.0+ | 6.0+ |
| 2.1.x | 16.4+ | 6.0+ |
The package declares Swift tools version 6.0. The review and release workflows on main use the repository’s pinned Xcode version.
| Version | iOS | tvOS | Mac Catalyst | macOS | visionOS | watchOS |
|---|---|---|---|---|---|---|
| 2.3.0+ | 15.0+ | 15.0+ | 15.0+ | 12.0+ | 1.3+ | - |
| 2.2.x | 15.0+ | 15.0+ | 15.0+ | 12.0+ | 1.0+ | - |
- The libsrt 1.5.7 dependency includes arm64 Mac Catalyst support. HaishinKit currently has a separate Mac Catalyst build issue in
TextScreenObject.swift(NSColoris unavailable).
Important
There are several issues that occur when connected to Xcode. Please also refer to this document.
- Reference implementation app for live streaming
publishandplayback. - If an issue occurs, please check whether it also happens in the examples app.
- System codec inspector: VideoToolbox and AudioConverter reports in the iOS, macOS, tvOS and visionOS samples.
- Apple TV studio: Bonjour SRT send/receive, test signals, and Continuity Camera (tvOS 17+).
The macOS example below publishes a test-signal ScreenObject and receives it over SRT, without a camera.
| Publish (macOS) | Playback (macOS) |
|---|---|
![]() |
![]() |
Open the workspace and select an Example target. Use its connection settings where available; shared development defaults are in Examples/Preference.swift.
git clone https://github.com/HaishinKit/HaishinKit.swift.git
cd HaishinKit.swift
open Examples/Examples.xcworkspacehttps://github.com/HaishinKit/HaishinKit.swiftMake sure you setup and activate your AVAudioSession iOS.
import AVFoundation
let session = AVAudioSession.sharedInstance()
do {
try session.setCategory(.playAndRecord, mode: .default, options: [.defaultToSpeaker, .allowBluetooth])
try session.setActive(true)
} catch {
print(error)
}Please make sure to contains Info.plist the following values when accessing the camera or microphone.
<key>NSCameraUsageDescription</key>
<string>your usage description here</string>
<key>NSMicrophoneUsageDescription</key>
<string>your usage description here</string>| Project name | Notes | License |
|---|---|---|
| HaishinKit for Android. | Camera and Microphone streaming library via RTMP for Android. | BSD 3-Clause "New" or "Revised" License |
| HaishinKit for Flutter. | Camera and Microphone streaming library via RTMP for Flutter. | BSD 3-Clause "New" or "Revised" License |
BSD-3-Clause

