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:
@@ -75,6 +75,16 @@ if(VOICECAT_USE_VCPKG_DEPS)
|
||||
|
||||
target_compile_definitions(voicecat PUBLIC VOICECAT_HAS_OPUS VOICECAT_HAS_AUDIO)
|
||||
|
||||
# On iOS, miniaudio's AVFoundation backend includes Objective-C headers (AVFoundation.h →
|
||||
# Foundation.h). Compiling those as plain C++ fails; setting LANGUAGE OBJCXX for
|
||||
# audio_engine.cpp (the only file that includes miniaudio.h directly) fixes this.
|
||||
if(CMAKE_SYSTEM_NAME STREQUAL "iOS")
|
||||
set_source_files_properties(
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/src/audio/audio_engine.cpp
|
||||
PROPERTIES LANGUAGE OBJCXX
|
||||
)
|
||||
endif()
|
||||
|
||||
if(WIN32)
|
||||
# AcceptEx / GetAcceptExSockaddrs live in mswsock; ws2_32 covers the base Winsock API.
|
||||
target_link_libraries(voicecat PRIVATE ws2_32 mswsock)
|
||||
|
||||
Reference in New Issue
Block a user