Native Client Builds & Verification
Each of Chirp's four clients builds a native UI and platform audio stack on top of the shared Rust OpenMLS/SAS/.chirpkey core and shared AuthorizationTrust.json public key.
Apple Clients (macOS / iOS)
Chirp-macOS and Chirp-iOS share SwiftUI screens and session state in Shared/ targeting macOS 27.0+ / iOS 27.0+ (XCFramework includes Apple Silicon Mac, arm64 iPhone, and arm64 iOS Simulator slices). Xcode Project
Dependencies, Building & Launching
On an Apple Silicon Mac, install Xcode 27, Swift tools 6.4, Python 3.12+, patch, and rustup, then run from repo root: Package.swift · LiveKit Prepare Script
rustup target add aarch64-apple-darwin aarch64-apple-ios aarch64-apple-ios-sim
python3 scripts/prepare-livekit-swift.py
python3 scripts/prepare-rnnoise.py
sh scripts/prepare-mls.sh
open Client/apple/Chirp.xcodeproj- What these scripts do:
prepare-livekit-swift.pyverifies upstream LiveKit/WebRTC archive hashes and patchesVendor/(ICE isolation, local mic intent, slot rotation, receiver decryption, chat gating);prepare-mls.shcompilesChirpMLSNative.xcframework(pass--host-onlyfor faster macOS-only iteration). Runscripts/prepare-mls-notices.pywhen upgrading Rust crates. - One-step macOS build & launch:
./scripts/build_and_run.shlaunchesClient/apple/dist/macos/Chirp.app. Supply an Apple Development team ID to test Data Protection Keychain isolation (--verifyconfirms 10s uptime):shCHIRP_MACOS_TEAM_ID='YOUR_TEAM_ID' ./scripts/build_and_run.sh --verify
Apple Modules & Automated Test Suites
| Folder / Module | Responsibility |
|---|---|
Shared/, Shared/Views/ | Discovery, Passkey auth (cn.youzifeile.chirp://auth/callback), directory sync, SwiftUI views. |
MLS/ | Swift-to-C bridge around Rust OpenMLS, SAS, and .chirpkey. Rust Core |
Audio/, Voice/ | Audio preprocessing, RNNoise, Opus AES-GCM sealing, and 96-bit IV replay filtering. Capture Pipeline |
GroupSession.swift, LiveKitCallMedia.swift | Group state coordination, smooth rotation, 3s media permits, and LiveKit binding. |
Run project consistency, localization coverage, and all four Swift test suites:
python3 Client/apple/Scripts/check-project.py
python3 -X utf8 Client/apple/Scripts/check-localizations.py
swift test --package-path Client/apple --scratch-path .build/swift-core
swift test --package-path Client/apple/MLS --scratch-path .build/swift-mls
swift test -c release --package-path Client/apple/Audio --scratch-path .build/rnnoise-tests
swift test --package-path Client/apple/MediaChecks --scratch-path .build/media-checksTo enable hardware audio/room-sound checks in Xcode host tests, set CHIRP_ROOM_SOUND_PLAYBACK_CHECK=1 or TEST_RUNNER_CHIRP_AUDIO_HARDWARE_CHECK=1, or run scripts/test-identity-device.py.
Building & Installing on Physical iPhone
Unlock an iPhone with Developer Mode enabled, look up its ID via xcrun devicectl list devices, and run:
CHIRP_IOS_TEAM_ID='YOUR_TEAM_ID'
CHIRP_IOS_DEVICE_ID='YOUR_DEVICE_ID'
xcodebuild -project Client/apple/Chirp.xcodeproj -scheme Chirp-iOS \
-configuration Release -destination "platform=iOS,id=$CHIRP_IOS_DEVICE_ID" \
-derivedDataPath .build/DerivedData-ios-device -clonedSourcePackagesDirPath .build/apple-packages \
-disableAutomaticPackageResolution -onlyUsePackageVersionsFromResolvedFile \
-allowProvisioningUpdates -allowProvisioningDeviceRegistration \
DEVELOPMENT_TEAM="$CHIRP_IOS_TEAM_ID" CODE_SIGN_STYLE=Automatic \
CODE_SIGN_IDENTITY='Apple Development' CODE_SIGNING_ALLOWED=YES CODE_SIGNING_REQUIRED=YES build
codesign --verify --deep --strict .build/DerivedData-ios-device/Build/Products/Release-iphoneos/Chirp.app
xcrun devicectl device install app --device "$CHIRP_IOS_DEVICE_ID" \
.build/DerivedData-ios-device/Build/Products/Release-iphoneos/Chirp.appmacOS codeless resource bundles & Hardened Runtime
Hardened Runtime stays enabled for signed macOS builds; the Prepare codeless resource bundles build phase (prepare-macos-resource-bundles.py) normalizes ChirpAudio, ChirpMLS, and LiveKit bundles so strict signature checks pass.
Android Client
Built with Kotlin + Jetpack Compose + Core-Telecom, supporting Android 15 (API 35)+ on arm64-v8a and x86_64 (targetSdk = 37). AndroidManifest · build.gradle.kts
Toolchain & Debug Build
Install JDK 27.0.1, Android SDK Platform 37.2, Build Tools 37.0.0, NDK 30.0.16248370, CMake 4.1.2, Rust 1.100.0, Git, patch, Python 3.12+, and adb, then build inside Client/android (.\gradlew.bat on Windows):
rustup target add aarch64-linux-android x86_64-linux-android
./gradlew :app:assembleDebug testDebugUnitTest :app:lintDebug
adb install -r app/build/outputs/apk/debug/app-debug.apk- Gradle automatically patches LiveKit Android, invokes CMake for both
arm64-v8aandx86_64native libraries (Rust OpenMLS, voice crypto, RNNoise), and validatesAuthorizationTrust.json. - Local debugging tip: Debug APKs allow loopback
http://servers viaadb reverse(UDP voice still requires direct reachability to LiveKit's UDP port). On Android 17, grant LAN access in Me → Preferences.
Android Module Index
| Area | Primary Sources |
|---|---|
| Discovery & Passkey | ServerRepository.kt (cn.youzifeile.chirp.android://auth/callback) |
| Keystore & QR Pairing | IdentityVault.kt · DevicePairing.kt |
| Groups & Voice Crypto | SecureGroup.kt · CallService.kt · VoiceKeys.kt |
| Chat, Files & Compose UI | RoomChat.kt · ChirpApp.kt |
Open-Source APK Signing & Fingerprint Verification
The open-source branch includes the Chirp Open Source release keystore under Client/android/signing/ for reproducible open-source updates (private forks may substitute their own keystore):
| Field | Open-Source Release Value |
|---|---|
| Application ID | cn.youzifeile.chirp.android |
| Keystore file & type | Client/android/signing/chirp-release.p12 (PKCS12, alias chirp-release) |
| Algorithm & Subject | RSA 4096-bit · SHA256withRSA · CN=Chirp Open Source, OU=Android, O=Chirp Open Source |
| Signing Schemes | APK Signature Scheme v2 / v3 only (v1 disabled) |
| Cert SHA-256 Digest | FE:2C:66:57:7E:28:56:A8:CA:5A:0C:F9:E8:50:2A:D3:AF:CA:0F:D5:AE:6E:7E:B2:9A:0A:0D:38:08:D1:57:42 |
Build a release APK and verify signatures/fingerprint:
./gradlew :app:assembleRelease
"$ANDROID_HOME/build-tools/37.0.0/apksigner" verify --verbose --print-certs app/build/outputs/apk/release/app-release.apkUnit & Instrumented Device Tests
Run full instrumented checks (native loading, screen rotation, large fonts, WebRTC crypto) on a connected device or emulator:
./gradlew :app:assembleDebug :app:assembleDebugAndroidTest
adb -s SERIAL install -r app/build/outputs/apk/debug/app-debug.apk
adb -s SERIAL install -r app/build/outputs/apk/androidTest/debug/app-debug-androidTest.apk
adb -s SERIAL shell am instrument -w cn.youzifeile.chirp.android.test/androidx.test.runner.AndroidJUnitRunner- Dual-ABI check: Because WebRTC
150.7871.08C++ vtables differ onarm64-v8avs.x86_64, always verifyVoiceTransportTeston both ABIs after NDK or WebRTC updates (adb install -r --abi arm64-v8aon translation-capable emulators). - Live Go protocol suite: Run
python3 scripts/test-android-protocol.py --serial SERIALfrom repo root to drive Android instrumentation against a real local Go + LiveKit stack. Android Protocol Runner
Windows Client
Combines a C# / WinUI 3 UI process with a Go protocol engine subprocess (Chirp.Protocol.exe) targeting Windows 11 x64 24H2 (Build ≥ 26100). Chirp.csproj
Toolchain & Running Locally
In PowerShell 7 with .NET 11 SDK, Windows SDK, Visual Studio x64 C++ Build Tools, WinApp CLI, Go, Rust (MSVC), Git, and Python 3.12+: Packages · Native Build Script
& ./Client/windows/scripts/Use-DevTools.ps1
winapp run Client/windows/Chirp/Chirp.csproj --arch x64winapp run compiles native DLLs/Go engine, registers cn.youzifeile.chirp.windows://auth/callback, and launches the app (dotnet build Client/windows/Chirp/Chirp.csproj -p:Platform=x64 validates build only).
Windows Module Index
| Component | Key Source Files |
|---|---|
WinUI 3 Shell & Audio (Chirp/) | Multi-window sync, PKCE callbacks, QR camera/image scanning (ZXing), WASAPI I/O, Concentus Opus, Fluent themes. App.xaml.cs · DesktopAudio.cs |
Go Engine (engine/) | stdin/stdout JSON pipe protocol handling auth, friends, groups, LiveKit/Pion transport, attachments, and .chirplog. ProtocolClient.cs · main_windows.go |
| Rust Audio & Crypto DLLs | audio/ (Sonora software AEC3/AGC2) + Chirp.RNNoise.dll; chirp_mls_native.dll for OpenMLS/SAS/.chirpkey; user DPAPI protects identities.v5. vault_windows.go |
Regression Tests, Versioning & Installers
- Automated tests (set
CHIRP_LIVEKIT_SERVERto locallivekit-server.exeto enableTestNativeTwoPartyRoom):powershellpwsh -NoProfile -File Client/windows/scripts/Build-Native.ps1 -Test dotnet run --project Client/windows/tests/DesktopBehavior.csproj -c Release go test ./internal/passkeyhttp ./internal/httpapi ./internal/group - Sync version numbers before release: Update three files together (network_windows.go
version/build, Chirp.csproj<Version>, and Package.appxmanifestIdentity Version). - Build
Setup.exe(requires Inno Setup 7 inPATHorCHIRP_ISCC): outputs self-contained.build/releases/Chirp-Windows-<version>-x64-Setup.exe(unauthenticated by default; uninstall cleans user identities). Build-Installer.ps1 · Chirp.isspowershellpwsh -NoProfile -File Client/windows/scripts/Build-Installer.ps1 - Package
MSIX(sign sideloaded builds with a cert matchingPublisher="CN=Chirp"trusted by target machines):powershellwinapp package Client/windows/Chirp/Chirp.csproj -c Release --arch x64 --no-sign --output .build/Chirp-x64.msix Get-FileHash .build/Chirp-x64.msix -Algorithm SHA256
