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

@@ -0,0 +1,48 @@
import SwiftUI
import VoiceCatCore
struct MoveUserView: View {
let user: User
@Bindable var session: SessionState
@Environment(\.dismiss) private var dismiss
@State private var selectedChannelId: UInt32 = 0
var body: some View {
NavigationStack {
List(session.channels) { channel in
HStack {
Text(channel.name)
Spacer()
if channel.id == selectedChannelId {
Image(systemName: "checkmark")
.foregroundStyle(.blue)
.accessibilityHidden(true)
}
}
.contentShape(Rectangle())
.onTapGesture { selectedChannelId = channel.id }
.accessibilityElement(children: .combine)
.accessibilityLabel("\(channel.name)\(channel.id == selectedChannelId ? ", selected" : "")")
.accessibilityAddTraits(channel.id == selectedChannelId ? .isSelected : [])
}
.navigationTitle("Move \(user.nickname)")
.navigationBarTitleDisplayMode(.inline)
.toolbar {
ToolbarItem(placement: .cancellationAction) {
Button("Cancel") { dismiss() }
}
ToolbarItem(placement: .confirmationAction) {
Button("Move") {
session.moveUser(user.id, toChannel: selectedChannelId)
dismiss()
}
.disabled(selectedChannelId == 0)
}
}
}
.onAppear {
selectedChannelId = user.channelId
}
}
}