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:
8
cmake/toolchains/ios-device.cmake
Normal file
8
cmake/toolchains/ios-device.cmake
Normal file
@@ -0,0 +1,8 @@
|
||||
# Chainload toolchain for iOS device cross-compilation (arm64-ios vcpkg triplet).
|
||||
# Loaded by vcpkg when building all dependencies for the arm64-ios target, ensuring
|
||||
# every dep is compiled against the iPhone OS SDK (not the macOS SDK).
|
||||
set(CMAKE_SYSTEM_NAME iOS)
|
||||
set(CMAKE_SYSTEM_PROCESSOR arm64)
|
||||
set(CMAKE_OSX_ARCHITECTURES arm64)
|
||||
set(CMAKE_OSX_SYSROOT iphoneos)
|
||||
set(CMAKE_OSX_DEPLOYMENT_TARGET 17.0)
|
||||
8
cmake/toolchains/ios-simulator.cmake
Normal file
8
cmake/toolchains/ios-simulator.cmake
Normal file
@@ -0,0 +1,8 @@
|
||||
# Chainload toolchain for iOS simulator cross-compilation (arm64-ios-simulator vcpkg triplet).
|
||||
# Loaded by vcpkg when building all dependencies for the arm64-ios-simulator target, ensuring
|
||||
# every dep is compiled against the iphonesimulator SDK (platform tag IOSSIMULATOR, not IOS).
|
||||
set(CMAKE_SYSTEM_NAME iOS)
|
||||
set(CMAKE_SYSTEM_PROCESSOR arm64)
|
||||
set(CMAKE_OSX_ARCHITECTURES arm64)
|
||||
set(CMAKE_OSX_SYSROOT iphonesimulator)
|
||||
set(CMAKE_OSX_DEPLOYMENT_TARGET 17.0)
|
||||
13
cmake/vcpkg-overlays/triplets/arm64-ios-simulator.cmake
Normal file
13
cmake/vcpkg-overlays/triplets/arm64-ios-simulator.cmake
Normal file
@@ -0,0 +1,13 @@
|
||||
set(VCPKG_TARGET_ARCHITECTURE arm64)
|
||||
set(VCPKG_CRT_LINKAGE dynamic)
|
||||
set(VCPKG_LIBRARY_LINKAGE static)
|
||||
set(VCPKG_CMAKE_SYSTEM_NAME iOS)
|
||||
# Release-only: debug iOS binaries are never shipped and skipping them halves build time.
|
||||
set(VCPKG_BUILD_TYPE release)
|
||||
# Override the autoconf --host triple (same rationale as arm64-ios.cmake — prevents autoconf from
|
||||
# treating cross-compilation as a native build and trying to run arm64-ios binaries on macOS).
|
||||
set(VCPKG_MAKE_BUILD_TRIPLET "--host=aarch64-apple-ios17.0-simulator")
|
||||
# Chainload toolchain: forces every vcpkg dep to compile against the iphonesimulator SDK so all
|
||||
# objects carry the platform IOSSIMULATOR tag (not IOS or MACOS). Critical for xcodebuild's
|
||||
# -create-xcframework which rejects fat libs that mix platform tags.
|
||||
set(VCPKG_CHAINLOAD_TOOLCHAIN_FILE "${CMAKE_CURRENT_LIST_DIR}/../../toolchains/ios-simulator.cmake")
|
||||
14
cmake/vcpkg-overlays/triplets/arm64-ios.cmake
Normal file
14
cmake/vcpkg-overlays/triplets/arm64-ios.cmake
Normal file
@@ -0,0 +1,14 @@
|
||||
set(VCPKG_TARGET_ARCHITECTURE arm64)
|
||||
set(VCPKG_CRT_LINKAGE dynamic)
|
||||
set(VCPKG_LIBRARY_LINKAGE static)
|
||||
set(VCPKG_CMAKE_SYSTEM_NAME iOS)
|
||||
# Release-only: debug iOS binaries are never shipped and skipping them halves build time.
|
||||
set(VCPKG_BUILD_TYPE release)
|
||||
# Override the autoconf --host triple. Without this, vcpkg uses arm64-apple-darwin (same as the
|
||||
# macOS build machine), which makes autoconf think it's a native build and try to run compiled
|
||||
# programs — those are iOS arm64 binaries and can't execute on macOS. An ios-suffixed triple
|
||||
# signals cross-compilation and disables all run-time configure checks.
|
||||
set(VCPKG_MAKE_BUILD_TRIPLET "--host=aarch64-apple-ios17.0")
|
||||
# Chainload toolchain: forces every vcpkg dep to compile against the iphoneos SDK so all objects
|
||||
# carry the platform IOS tag (not MACOS). Without this the fat library mixes platforms.
|
||||
set(VCPKG_CHAINLOAD_TOOLCHAIN_FILE "${CMAKE_CURRENT_LIST_DIR}/../../toolchains/ios-device.cmake")
|
||||
Reference in New Issue
Block a user