Files
workouts/Workouts Watch App/WatchAppServices.swift
rzen 84d45a6d41 Add App Store screenshot harness + listing metadata
DEBUG-only screenshot support (seeded sample data via ScreenshotSeed, per-screen
launch args, screenshot roots for both apps) so iPhone + Apple Watch App Store
shots can be captured deterministically from the simulator — all excluded from
release builds. Also seed ExerciseView's set-grid progress in init so it renders
correctly on the first frame. Adds Scripts/metadata/ as the listing source of
truth (copy, URLs, review notes, and the captured screenshots).

Claude-Session: https://claude.ai/code/session_018gg69MaUetDNzWzBXisfMV
2026-06-19 19:23:54 -04:00

27 lines
729 B
Swift

import Foundation
import Observation
import SwiftData
/// Composition root for the watch app. Owns the local SwiftData cache and the
/// WatchConnectivity bridge. The watch has no iCloud access; all data arrives from
/// the phone via the bridge.
@Observable
@MainActor
final class WatchAppServices {
let container: ModelContainer
let bridge: WatchConnectivityBridge
init() {
let container = WorkoutsModelContainer.make()
self.container = container
self.bridge = WatchConnectivityBridge(container: container)
#if DEBUG
if ScreenshotSeed.isActive { ScreenshotSeed.populate(container.mainContext) }
#endif
}
func activate() {
bridge.activate()
}
}