feat(apple): tvOS client — third app target, first-lit in the Apple TV simulator
ci / rust (push) Has been cancelled
ci / rust (push) Has been cancelled
The same app now runs on tvOS (target Punktfunk-tvOS, bundle io.unom.punktfunk.tvos), validated live against the box: vkcube at 1280x720@60, 60 fps in the Apple TV 4K simulator, glass HUD with a focusable Disconnect button. - PunktfunkCore.xcframework grows tvOS device + universal-simulator slices. These are TIER-3 Rust targets (no prebuilt std): BUILD_TVOS=1 builds them with nightly and -Zbuild-std from rust-src — the full quic stack (quinn/rustls-ring/tokio) compiles for tvOS unchanged. - The UIKit stream view covers iOS AND tvOS, with pointer interaction, pointer lock, touch forwarding and InputCapture gated to iOS — tvOS is view-only until gamepad capture lands (the natural tvOS input). - SessionAudio on tvOS: .playback session, no mic (no app-accessible microphone). - App chrome gates: keyboardShortcut/textSelection/controlSize/statusBarHidden are iOS/macOS-only; host cards use the focus-native .card button style on tvOS; the Audio settings section hides (system-routed); mode seeding works from the TV screen (1920x1080@60). - Package platforms += .tvOS(.v17); new Xcode target + shared scheme (TARGETED_DEVICE_FAMILY 3, local-network usage description included). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
@@ -12,6 +12,7 @@ cd "$(dirname "$0")/.."
|
||||
|
||||
TARGETS_MAC=(aarch64-apple-darwin x86_64-apple-darwin)
|
||||
BUILD_IOS="${BUILD_IOS:-0}" # BUILD_IOS=1 adds iOS device + simulator slices (rustup targets aarch64-apple-ios{,-sim})
|
||||
BUILD_TVOS="${BUILD_TVOS:-0}" # BUILD_TVOS=1 adds tvOS slices — TIER-3 Rust targets: needs `rustup toolchain install nightly` + `rustup component add rust-src --toolchain nightly`
|
||||
|
||||
# Deployment targets must match Package.swift's platforms, or every consumer link emits
|
||||
# "object file was built for newer macOS version" warnings.
|
||||
@@ -23,6 +24,15 @@ if [[ "$BUILD_IOS" == "1" ]]; then
|
||||
IPHONEOS_DEPLOYMENT_TARGET=17.0 cargo build --release -p punktfunk-core --features quic --target aarch64-apple-ios-sim
|
||||
IPHONEOS_DEPLOYMENT_TARGET=17.0 cargo build --release -p punktfunk-core --features quic --target x86_64-apple-ios
|
||||
fi
|
||||
if [[ "$BUILD_TVOS" == "1" ]]; then
|
||||
# Tier-3 targets: no prebuilt std — nightly + -Zbuild-std compiles it from rust-src.
|
||||
TVOS_DEPLOYMENT_TARGET=17.0 cargo +nightly build --release -p punktfunk-core --features quic \
|
||||
-Z build-std=std,panic_abort --target aarch64-apple-tvos
|
||||
TVOS_DEPLOYMENT_TARGET=17.0 cargo +nightly build --release -p punktfunk-core --features quic \
|
||||
-Z build-std=std,panic_abort --target aarch64-apple-tvos-sim
|
||||
TVOS_DEPLOYMENT_TARGET=17.0 cargo +nightly build --release -p punktfunk-core --features quic \
|
||||
-Z build-std=std,panic_abort --target x86_64-apple-tvos
|
||||
fi
|
||||
|
||||
STAGE="$(mktemp -d)"
|
||||
trap 'rm -rf "$STAGE"' EXIT
|
||||
@@ -59,6 +69,15 @@ if [[ "$BUILD_IOS" == "1" ]]; then
|
||||
ARGS+=(-library target/aarch64-apple-ios/release/libpunktfunk_core.a -headers "$STAGE/include")
|
||||
ARGS+=(-library "$STAGE/iossim/libpunktfunk_core.a" -headers "$STAGE/include")
|
||||
fi
|
||||
if [[ "$BUILD_TVOS" == "1" ]]; then
|
||||
mkdir -p "$STAGE/tvossim"
|
||||
lipo -create \
|
||||
target/aarch64-apple-tvos-sim/release/libpunktfunk_core.a \
|
||||
target/x86_64-apple-tvos/release/libpunktfunk_core.a \
|
||||
-output "$STAGE/tvossim/libpunktfunk_core.a"
|
||||
ARGS+=(-library target/aarch64-apple-tvos/release/libpunktfunk_core.a -headers "$STAGE/include")
|
||||
ARGS+=(-library "$STAGE/tvossim/libpunktfunk_core.a" -headers "$STAGE/include")
|
||||
fi
|
||||
|
||||
# Cargo does NOT fingerprint MACOSX_DEPLOYMENT_TARGET — units cached from a build without
|
||||
# it keep their old minos forever. Refuse to ship anything newer than the package floor
|
||||
|
||||
Reference in New Issue
Block a user