iOS app for pi-remote-control sidecar
Go to file
jay 9231a630a9 Merge T-2.10 Background lifecycle (TDD: tests → impl → review → fixup)
- AppState exposes lifecycleTransitions publisher (bg=true / fg=false)
- SessionConnection: suspend()/resume() with isStreamFrozen + isKeepAliveActive,
  injected ResumeCursor that updates on every binary frame (B-1 fix)
- MainTerminalView: scenePhase → AppState → suspend before background,
  resume(from: lastSeq) on foreground, 'Reconnecting…' status
- Post-Face-ID reconnect: re-emit foreground transition after successful auth
- #if DEBUG gating for all test launch args (--reset-state, --enable-faceid,
  --force-lock, --uitest-with-stub-connection, --pair-with-url) and stubMode
- 22 new lifecycle tests (10 SessionConnection + 6 AppState + 4 UI + 2 regression
  guards) + 6 follow-up tests (CG-1..CG-4)
- Final: 130 unit tests / 8 pre-existing failures; 12/12 UI tests
2026-05-17 13:24:30 +02:00
Sources fix(ios): T-2.10 review follow-up — B-1 blocker + nits + coverage gaps 2026-05-17 12:27:08 +02:00
Tests/CoreTests fix(ios): T-2.10 review follow-up — B-1 blocker + nits + coverage gaps 2026-05-17 12:27:08 +02:00
UITests test(ios): T-2.10 background lifecycle — failing tests (TDD step 1/3) 2026-05-16 23:01:55 +02:00
docs docs: simulator UI automation guide (verified) 2026-05-16 13:04:16 +02:00
piRemote.xcodeproj test(ios): T-2.10 background lifecycle — failing tests (TDD step 1/3) 2026-05-16 23:01:55 +02:00
.gitignore feat(T-2.0): Xcode project scaffold — SwiftUI shell, SwiftTerm + Starscream SPM deps 2026-05-15 13:19:48 +02:00
README.md docs: update status table — T-2.0..T-2.5+T-2.9 done 2026-05-16 02:42:02 +02:00
project.yml feat(ios): add piRemoteUITests XCUITest target with smoke test 2026-05-16 16:59:26 +02:00

README.md

pi-remote iOS

Native iOS app for the pi-remote-control sidecar.

Requirements

  • Xcode 16.4+
  • iOS 17.0+ device
  • pi-remote-control sidecar running (Phase 1)

Building

# Open in Xcode (first time: Xcode downloads device support files automatically)
open piRemote.xcodeproj

# Or via CLI (after first Xcode open with device connected):
xcodebuild build -project piRemote.xcodeproj -scheme piRemote \
  -destination "platform=iOS,name=<YourPhone>" \
  CODE_SIGNING_STYLE=Automatic DEVELOPMENT_TEAM=KNXX8R3648

Project structure

Sources/
├── App/          — @main entry, ContentView, Assets
├── Core/
│   ├── Network/  — WebSocketClient, FrameCodec, ResumeCursor, TLS pinning
│   ├── Auth/     — Keychain, Pairing (QR exchange)
│   ├── Sessions/ — SessionRegistry, SessionConnection, PreConnectPool
│   ├── Push/     — APNs NotificationDelegate, DeviceTokenRegistrar
│   └── Persistence/ — ScrollbackCache, Preferences
└── UI/
    ├── Terminal/ — SwiftTerm wrapper, themes, fonts
    ├── Input/    — ModifierBar, sticky Ctrl, paste sheet
    ├── Status/   — StatusBar (pi state)
    ├── Sessions/ — SessionSwitcher
    ├── Pairing/  — QR scanner flow
    └── Settings/ — Face-ID gate, sidecar info

Dependencies (via SPM)

Apple Developer setup (one-time)

  1. In Apple Developer Portal:
    • Create App ID: de.vpsj.pi-remote, enable Push Notifications
    • Generate an APNs Auth Key (.p8) — download once, keep safe
    • Note your Key ID and Team ID (KNXX8R3648)
  2. Copy .p8 key to ~/.local/share/pi-remote/apns/AuthKey_<KeyID>.p8
  3. Update [apns] section in pi-remote-control config

Status

Phase 2 — in progress.

Task Status
T-2.0 Xcode scaffold done
T-2.1 WebSocketClient + FrameCodec + ResumeCursor done
T-2.2 Pairing + Keychain + QRScanner done
T-2.3 TerminalView + ThemeStore + FontStore done
T-2.4 ModifierBar + ModifierState + PasteSheet done
T-2.5 SessionConnection (IC-2.1) + ScrollbackCache done
T-2.9 APNs NotificationDelegate + DeviceTokenRegistrar done
T-2.6 SessionRegistry + SessionSwitcher UI next
T-2.7 PreConnectPool after T-2.6
T-2.8 StatusBar + Side-channel next
T-2.10 Background lifecycle todo
T-2.11 Face-ID gate + Settings next
T-2.12 TestFlight pipeline todo
T-2.13 MVP smoke test last

App runs on device: iOS 26, wireless, Xcode 16.4 Intel Mac.
111 unit tests across FrameCodec, ResumeCursor, Pairing, Keychain, Theme, ModifierState, ScrollbackCache, DeviceTokenRegistrar.

See pi-remote-control/docs/PHASE-2-ios-mvp.md for full spec.