Extend managed macOS client toward feature parity
.NET port / test (macos-latest) (push) Canceled after 0s
.NET port / test (ubuntu-24.04) (push) Canceled after 0s
.NET port / test (windows-latest) (push) Canceled after 0s
.NET port / apple-client (push) Canceled after 0s
.NET port / cpp-conformance (push) Canceled after 0s

This commit is contained in:
2026-09-19 00:39:04 +02:00
parent 310c0f09dd
commit d0a72176ba
25 changed files with 1292 additions and 40 deletions
+2 -2
View File
@@ -14,7 +14,7 @@ that implementation can start from a shared, agreed plan.
| Area | Decision |
|------|----------|
| Code architecture | **Shared C++ core** (`libvoicecat`) consumed by native UIs over a **C ABI**. Server reuses the same core. |
| Native clients | macOS/iOS in **Swift** (SwiftUI; Swift↔C++ interop), Windows in **C#** (`LibraryImport` P/Invoke). |
| Native clients | Managed **C#** WinForms and AppKit replacements are implemented; Swift macOS remains the migration/release oracle pending manual cutover gates, and iOS remains Swift. |
| Control transport | **TCP + TLS 1.3** (mbedTLS) |
| Media transport | **UDP** secured by **TLS-exported keys + ChaCha20-Poly1305 AEAD** — mandatory, no plaintext mode (see [security.md](security.md)) |
| Crypto libraries | **mbedTLS** (TLS 1.3) + **libsodium** (AEAD, Argon2id, Ed25519) — both permissive, **no GPL/LGPL anywhere** |
@@ -34,7 +34,7 @@ that implementation can start from a shared, agreed plan.
5. [tech-stack.md](tech-stack.md) — Concrete libraries with versions and rationale, the permissive-license rule, build tooling, per-platform notes.
6. [deployment.md](deployment.md) — The "set it up in a few minutes" story: Docker, single binary, source build, zero-config defaults.
7. [roadmap.md](roadmap.md) — Milestones, what ships when, and the list of open questions still to resolve.
8. [porting-to-dotnet.md](porting-to-dotnet.md) — **Proposal.** Step-by-step plan to replace the C++ core, C++ server, and Swift clients with a single .NET 10 / C# codebase. Dependency map, the TLS-exporter blocker, real-time-audio design, phased migration.
8. [porting-to-dotnet.md](porting-to-dotnet.md) — **Active migration.** Step-by-step plan and implementation checkpoints for replacing the C++ core, C++ server, and replaceable Swift clients with .NET 10 / C#. Dependency map, TLS exporter, real-time-audio design, and phased cutover gates.
## Design principles
+36 -4
View File
@@ -29,7 +29,8 @@ and *how to drive the binaries by hand*.
| Server + `vccli` + tests (all platforms) | [§3](#3-build--test-the-loop-youll-run-constantly) | `cmake --preset dev && cmake --build --preset dev && ctest --preset dev` |
| Production server (stripped, no tests) | [§5](#5-server-release-production-shaped-build) | `cmake --preset server-release && cmake --build --preset server-release` |
| Windows client (C# / WinForms) | [§7](#7-windows-client-c--winforms) | `dotnet build clients/windows/VoiceCat.slnx` |
| macOS client (AppKit) | [§8](#8-macos-client-appkit) | `scripts/build-macos-client.sh` |
| Managed macOS client (C# AppKit) | [§8](#8-macos-client-appkit) | `dotnet build clients/apple/dotnet/VoiceCat.Apple.slnx` |
| Swift macOS migration oracle | [§8](#8-macos-client-appkit) | `scripts/build-macos-client.sh` |
| iOS client (SwiftUI / simulator) | [§9](#9-ios-client-swiftui) | `scripts/build-ios-client.sh` |
| Launch iOS app on simulator | [§9](#9-ios-client-swiftui) | `scripts/run-ios-simulator.sh` |
| Swift core + tests | [§8](#8-macos-client-appkit) | `cd clients/apple && swift test` |
@@ -321,9 +322,40 @@ dotnet test clients/windows/VoiceCat.slnx
## 8. macOS client (AppKit)
The macOS client is an Xcode project (AppKit / Swift) that links `libvoicecat` via the
`VoiceCatCore` Swift Package, which consumes a binary XCFramework target. Full details in
[`clients/apple/README.md`](../clients/apple/README.md).
The replacement client is a C# AppKit application that consumes the managed core and the
small Opus/RNNoise media shim. The Swift/Xcode app remains the migration oracle until the
managed app passes its VoiceOver, live-call and notarization gates. Managed-client details are
in [`clients/apple/dotnet/README.md`](../clients/apple/dotnet/README.md); Swift-oracle details
remain in [`clients/apple/README.md`](../clients/apple/README.md).
**Managed prerequisites:** Xcode 27, .NET SDK/workload set 10.0.401, Homebrew `protobuf`, and
macOS 14+ (the current bindings target `net10.0-macos27.0`).
### Build and validate the managed app
```bash
cmake -S dotnet/native -B dotnet/artifacts/native-build \
-DCMAKE_BUILD_TYPE=Release -DVOICECAT_DOTNET_RID=osx-arm64
cmake --build dotnet/artifacts/native-build --config Release \
--target voicecat_media --parallel 2
cmake --install dotnet/artifacts/native-build --config Release \
--component DotnetMedia --prefix dotnet/artifacts/native
dotnet restore clients/apple/dotnet/VoiceCat.Apple.slnx
dotnet build clients/apple/dotnet/VoiceCat.Apple.slnx -c Debug
open clients/apple/dotnet/VoiceCat.Mac/bin/Debug/net10.0-macos27.0/osx-arm64/VoiceCat.app
```
Produce a Release bundle and verify its complete ad-hoc signature graph with:
```bash
zsh clients/apple/dotnet/publish-macos.sh --dry-run
```
For distribution, set `VOICECAT_CODESIGN_IDENTITY` to a Developer ID Application identity.
Setting `APPLE_ID`, `APPLE_TEAM_ID`, and `APPLE_APP_PASSWORD` also submits the archive for
notarization, staples it, and runs Gatekeeper assessment.
### Build the Swift migration oracle
**Prerequisites:** Xcode, vcpkg (`VCPKG_ROOT` set), macOS 14+ (deployment target).
+21 -7
View File
@@ -1,10 +1,10 @@
# Porting VoiceCat to pure .NET / C#
**Status:** wire/media crypto and TLS/exporter foundations implemented under `dotnet/`,
including C++ interoperability, persisted TOFU, compatible server credentials,
codec/DSP wrappers, desktop native staging, and the initial managed TLS control server.
Phase 4 remains in progress; complete session administration, device audio,
managed client state, and UI phases remain planned.
**Status:** the managed protocol, crypto, server, CLI, audio/client core, Windows client and
macOS functional surface are implemented under `dotnet/`, with C++ interoperability retained
as a migration oracle. The managed macOS client is awaiting its manual VoiceOver, live-call and
credentialed notarization gates before it replaces the Swift release client. The iOS rewrite
remains planned.
See `dotnet/README.md`, `docs/api-dotnet.md`, and `PROGRESS.md` for verification and next steps.
**Target runtime:** .NET 10 LTS (in-service to Nov 2028), with .NET 11 as the follow-on.
**Scope:** replace the C++ core (`libvoicecat`), the C++ server, the C++ `vccli`, and the
@@ -873,8 +873,22 @@ layout. The arm64 app builds, signs, launches and displays on macOS 27. Live tes
physical-microphone transmission and clean peer playback; Lobby's expected DTX comfort noise
was distinguished from corruption by repeating the tone in the DTX-disabled Music Room. A
macOS CI job builds the native codec/DSP shim and Apple solution. The existing Swift app
remains the release client until the moderation/settings surface, ScreenCaptureKit, VoiceOver
validation, signing and notarization are complete.
remains the release client until the manual release gates below are complete.
**Functional-parity checkpoint (2026-09-19):** the managed app now covers persistent audio
and notification settings, VAD/configurable focus-scoped PTT/always-on input, stereo capture,
RNNoise, input/output/auxiliary gain, selectable auxiliary capture, self mute/deafen, speaking
state, event sounds and speech, modeless private conversations, full channel configuration,
per-user receive tuning, moderation, permissions and account administration. ScreenCaptureKit
publishes desktop audio with whole-desktop, application-only and application-exclusion scopes
and can exclude VoiceOver/speech processes. Legacy Swift profiles, TOFU pins and Keychain
passwords migrate without discarding the original profile JSON. A publishing script validates
an isolated ad-hoc distribution copy without mutating incremental build output and supports
Developer ID signing, notarization, stapling and Gatekeeper assessment. Debug and Release
builds, 190 managed tests, 29 native CTests and a
strictly verified/running ad-hoc Release bundle pass. Do not remove the Swift macOS app yet:
cutover still requires a manual VoiceOver navigation/announcement pass, ScreenCaptureKit plus
real multi-human call validation, and an actual credentialed notarization run.
---