Files
tether/ios/build-and-run.sh
Patrick Ecord 14b6be7548 Add iOS v1 client: TetherKit SPM + SwiftUI app
TetherKit: Codable Message envelope (1:1 with Go server), SSE reader over
URLSession.bytes, TetherClient with reconnect/backoff. 3 wire-format tests pass.
TetherApp: SwiftUI room UI (connect, live feed, send clipboard/text, tap-to-copy),
generated via XcodeGen (project.yml). SSE-only, foreground; no WebRTC/APNs yet.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-20 00:11:31 -05:00

19 lines
972 B
Bash
Executable File

#!/usr/bin/env bash
# Waits for the iOS sim runtime, then builds, installs, boots and screenshots TetherApp.
set -euo pipefail
cd "$(dirname "$0")/TetherApp"
echo "waiting for iOS simulator runtime…"
until xcrun simctl list runtimes 2>/dev/null | grep -qi "iOS"; do sleep 30; done
echo "runtime ready: $(xcrun simctl list runtimes | grep -i iOS | tail -1)"
DEV=$(xcrun simctl create tether-test "iPhone 16 Pro" 2>/dev/null || \
xcrun simctl list devices available | grep -i iphone | head -1 | grep -oE '[0-9A-F-]{36}')
xcrun simctl boot "$DEV" 2>/dev/null || true
open -a Simulator
xcodebuild build -scheme TetherApp -destination "id=$DEV" -derivedDataPath /tmp/tether-dd | tail -3
APP=$(find /tmp/tether-dd/Build/Products -name "TetherApp.app" -maxdepth 3 | head -1)
xcrun simctl install "$DEV" "$APP"
xcrun simctl launch "$DEV" io.pecord.tether
sleep 3
xcrun simctl io "$DEV" screenshot /tmp/tether-launch.png
echo "DONE device=$DEV shot=/tmp/tether-launch.png"