feat(ios): ship iOS SwiftUI client (VoiceCatiOS)

Full SwiftUI app at clients/apple/iOS/VoiceCatiOS.xcodeproj:
- 24 Swift source files: AppState + SessionState (@Observable @MainActor),
  AudioSessionManager (AVAudioSession owner + interruption/route handling),
  ServerListStore/SavedServer (App Group container + Keychain sharing),
  and 14 SwiftUI views covering the full feature set
- NavigationSplitView on iPad, TabView on iPhone (horizontalSizeClass)
- Channel tree via OutlineGroup, user list with context menu admin actions
- PTT via DragGesture(minimumDistance: 0) + @GestureState
- onEvent closures hop to MainActor via Task { @MainActor in ... }
- App Group: group.cat.voice.VoiceCat (shared with future ReplayKit extension)

C ABI: add vc_audio_suspend / vc_audio_resume (AudioEngine::suspend/resume)
called by AudioSessionManager on AVAudioSession interruption events.

XCFramework: add ios-arm64 and ios-arm64-simulator slices to build-xcframework.sh;
Package.swift gains .iOS(.v17) platform; CMakePresets.json adds apple-ios /
apple-ios-sim presets with arm64-ios / arm64-ios-simulator vcpkg triplets.

Verified: xcodebuild -target VoiceCatiOS -sdk iphonesimulator26.5 BUILD SUCCEEDED.
This commit is contained in:
2026-06-19 02:10:25 +02:00
parent dbf732ca91
commit e26e7db5b1
46 changed files with 2929 additions and 22 deletions

View File

@@ -10,6 +10,30 @@ up instantly. Newest status at the top.
## ▶ Where we left off / next action
- **Done:** **iOS SwiftUI client — `VoiceCatiOS`** (2026-06-19). Full SwiftUI app at
`clients/apple/iOS/VoiceCatiOS.xcodeproj`. Mirrors the macOS AppKit and Windows WinForms
clients feature-for-feature: saved server list (JSON + Keychain passwords via App Group
`group.cat.voice.VoiceCat`), TOFU server-identity sheet (first-connect and mismatch), connect
flow (guest + account auth, connection state labels, password prompt), main window
(`NavigationSplitView` on iPad, `TabView` on iPhone via `horizontalSizeClass`), channel tree
(`OutlineGroup` recursive — `children: nil` for leaf nodes), user list with context menu
(kick/ban/move/set-permissions/server-mute), chat (`ScrollViewReader` + `LazyVStack`), activity
log, voice controls (mic toggle, PTT via `DragGesture(minimumDistance: 0)` + `@GestureState`,
level meter `Canvas`), per-user tuning (gain slider, mute, NR toggles), admin sheets (channels
CRUD, accounts CRUD, ban duration, move-to-channel), settings (input mode, VAD threshold,
device picker, disconnect). All 24 Swift source files in place (10 model/state + 14 views).
`@Observable` + `@MainActor` throughout — both `AppState` and `SessionState` are `@MainActor`.
`onEvent` closures dispatch to main actor via `Task { @MainActor in ... }`.
**C ABI additions:** `vc_audio_suspend` / `vc_audio_resume` (no-op when engine stopped) —
called by `AudioSessionManager` on AVAudioSession interruption (phone calls, Siri).
**XCFramework:** iOS arm64 + arm64-simulator slices added alongside existing macOS-arm64 slice;
`Package.swift` updated with `.iOS(.v17)`.
**Verified:** `xcodebuild -target VoiceCatiOS -sdk iphonesimulator26.5 -configuration Debug ...
SYMROOT=... OBJROOT=... build`**BUILD SUCCEEDED** (clean build).
- **Next:** ReplayKit Broadcast Upload Extension (`VoiceCatBroadcast`) for screen/system audio
sharing on iOS — separate Xcode target, App Group credential sharing, `SampleHandler.swift`.
Or: DRED/audio-quality polish (M5).
- **Done:** **macOS AppKit client builds clean (Debug + Release)** (2026-06-18). The previous
"shipped" claim in the entry below was incorrect — `xcodebuild` actually failed on a fresh
clone. Two real defect classes fixed, no source architecture changed:
@@ -504,7 +528,7 @@ up instantly. Newest status at the top.
- [x] **M1 — Control plane** ✓ complete (2026-06-15)
- [x] **M2 — Voice, single stream** ✓ complete (2026-06-16)
- [x] **M3 — Multi-stream & per-channel tuning** ✓ complete (2026-06-16)
- [x] **M4 — Native clients** — Windows WinForms ✓ (2026-06-17); macOS AppKit ✓ (2026-06-18); iOS SwiftUI pending
- [x] **M4 — Native clients** — Windows WinForms ✓ (2026-06-17); macOS AppKit ✓ (2026-06-18); iOS SwiftUI ✓ (2026-06-19)
- [~] **M5 — Moderation, polish, beyond** (perms, bans, DRED; then file transfer, E2EE, …)
---