← All changes
Foundation — schema, persistence, watch, Strava, library
The functional base of Coach lands in one intense day: JSON schema and decoder, iCloud import, runner + session logging, watchOS + HealthKit, Strava upload, and the exercise library.
What shipped
Six phases of functional groundwork, before any visual redesign.
- Schema + decoder. Typed workout model with per-field back-compat
(
decodeIfPresenteverywhere). Full test coverage for every optional field. - iCloud Drive import.
NSMetadataQuerywatchesCoach/Documents/workouts/and pulls new files in without an explicit sync trigger. SwiftData persists everything locally. - Runner + session logging. Sets, reps, timer, per-set pain slider (later removed in favor of the session-end pain gate).
- Watch + HealthKit.
HKWorkoutSessionowned by the phone (never the system Workout app — HealthKit would double-count). HR samples stream over WatchConnectivity. - Strava OAuth. PKCE flow, tokens in Keychain, one-way upload after each completed session.
- Exercise library. AVPlayer for local videos, tag filter, search,
cross-references, and a YouTube-search fallback for exercises without an
explicit
videoUrl(opens in an in-app Safari view).
No third-party dependencies at any point.