Add the macOS app: a library-management companion (routines, schedules, exercise browser)

A new 'Workouts Mac' target (same bundle ID as iOS, universal purchase)
with a NavigationSplitView shell over the shared data/sync layers:
routine management with starter gallery and seed-fork follow, schedule
editing (reminders stay iPhone-scheduled), and a browse-only exercise
library with the animated figures and reference guides.

Multi-writer stance: the Mac writes only routine and schedule documents
(whole-document last-writer-wins) and never workout documents, whose
per-log merge exists only on the watch ingest path. The Mac reconciles
on window activation (throttled) since iCloud syncs while the app is
closed, and flushes pending writes on deactivation.
This commit is contained in:
2026-07-16 19:55:06 -04:00
parent f6c5bc911f
commit cbdf02bca7
17 changed files with 2212 additions and 9 deletions
+11 -4
View File
@@ -1,6 +1,6 @@
# Workouts
A workout tracking app for iPhone and Apple Watch. Build workout splits, run
A workout tracking app for iPhone, Apple Watch, and Mac. Build workout splits, run
sessions, and track your progress — with your data stored as plain JSON files in
your own iCloud Drive.
@@ -110,6 +110,12 @@ your own iCloud Drive.
(duration, calories, avg/max heart rate, heart-rate zones with a legend, total
volume) you can revisit on any past workout. Weights display in your choice of
pounds or kilograms.
- **Mac app** — a native macOS companion for managing your library: create, edit,
reorder, and duplicate routines in a sidebar-driven window, manage schedules
(recurrence, weekdays, reminder times — your iPhone sends the notifications),
browse the starter gallery, and explore the exercise library with the same
animated figures and reference guides. Library management only — workouts still
run on iPhone and Apple Watch. Same iCloud data, no extra setup.
- **iCloud Drive sync** — your data lives as human-readable JSON in your iCloud
Drive, synced across devices and visible in the Files app. iCloud is required.
- **Backups** — create point-in-time snapshots of all your data from Settings,
@@ -123,8 +129,9 @@ your own iCloud Drive.
iCloud Drive JSON documents are the **sole source of truth**; a local SwiftData
store is a rebuildable read-through cache populated exclusively by an
`NSMetadataQuery` observer (one-way flow: files → observer → cache). The phone is
the only device that touches iCloud Drive; the Apple Watch is a thin remote that
`NSMetadataQuery` observer (one-way flow: files → observer → cache). The phone
and the Mac write iCloud Drive directly (the Mac only routines and schedules —
whole-document last-writer-wins); the Apple Watch is a thin remote that
round-trips workout changes through the phone via WatchConnectivity.
See `REQUIREMENTS.md` for the data model and `CLAUDE.md` for project guidance.
@@ -138,4 +145,4 @@ xcodegen generate
open Workouts.xcodeproj
```
Requires Xcode 26 (iOS 26 / watchOS 26, Swift 6).
Requires Xcode 26 (iOS 26 / watchOS 26 / macOS 26, Swift 6).