TestFlight Distribution Pipeline
TestFlight Distribution Pipeline
CAS-1866 | Delivered 2026-05-09 | Epic
What this is
A working TestFlight pipeline that lets the regent ship iOS builds from the command line in under 30 minutes — one command, no manual Xcode steps.
Why it matters
Cross-device sync (CAS-1093) and the Cloud Bridge (CAS-2102) are built; the missing piece was a repeatable path to get builds onto real devices and to external beta testers. This epic closed that gap.
What was delivered
deno task release:testflight — single-command build and upload
scripts/release-testflight.sh does the full sequence:
- Auto-bumps
CFBundleVersion(monotonically numeric, enforced) - Compiles Rust + iOS via
tauri ios build --release - Archives with
xcodebuild archive - Exports the
.ipaviaxcodebuild -exportArchive+ExportOptions.plist(method: app-store) - Uploads to App Store Connect via
xcrun altoolwith the API key at~/.paperclip/secrets/casaconomy-asc-api-key.p8
Credentials (Key ID 68J57ZMWKP, Issuer ID 69a6de76-…, Team 2KTMKQ23LD) are wired into the script; no env setup needed.
iOS sandbox path fixes (CAS-2085)
casaconomy_data_root() in src-tauri/src/shared.rs now uses the iOS app-group container path instead of falling back to the home directory, which is outside the iOS sandbox and caused immediate launch crashes on real devices.
iOS launch crash hardening (CAS-2005, CAS-2006)
Several robustness fixes that prevented the first TestFlight build from running:
- Sandbox root writes blocked during DB init
casaconomy/path double-nesting eliminated- Frontend web bundle now included in the IPA (was missing, causing a blank screen)
get_windowpanics converted to graceful no-ops on mobile- Deep-link init crash path hardened
iOS development runbook + skill (CAS-2086)
.agents/skills/casaconomy-ios-development/ — documents the iOS-specific gotchas (Xcode silent logout, cargo-mobile2 SDK-path matching, WKWebView IPC quirks, Maestro simulator limitations) so future engineers don’t re-discover them from scratch.
Operational runbook
docs/release/testflight.md — step-by-step for shipping a new build, including the altool upload semantics and the Manual vs Automatic distribution group gotcha.
Known gaps at delivery
- Manual distribution mode required for altool-uploaded builds (TestFlight Automatic mode only applies to Xcode-direct uploads). The tester group must be set to Manual and builds attached explicitly.
- Privacy policy and App Store metadata (Stream B) deferred — not blocking TestFlight internal access, required before public launch.
- CI upload step not wired — the pipeline is a local-machine script; no GitHub Actions integration yet.