feat(watchos): UI live workout + entry point (Phase 2)

CoachWatchApp: WKApplicationDelegateAdaptor active WCSession au boot, injecte les
managers. ContentView: picker 4 activités (course/vélo/marche/renfo) -> vue live
(FC/calories/distance/durée + état liaison iPhone) -> bouton Terminer. Build OK.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
Sylvain
2026-05-24 16:23:06 +02:00
parent 167c1e4c27
commit 518529891b
2 changed files with 135 additions and 9 deletions

View File

@@ -1,10 +1,22 @@
import SwiftUI
import WatchKit
@main
struct CoachWatchApp: App {
@WKApplicationDelegateAdaptor private var appDelegate: WatchAppDelegate
var body: some Scene {
WindowGroup {
ContentView()
.environmentObject(WorkoutManager.shared)
.environmentObject(ConnectivityManager.shared)
}
}
}
final class WatchAppDelegate: NSObject, WKApplicationDelegate {
func applicationDidFinishLaunching() {
// Active WCSession dès le boot pour ne rater aucun early message.
_ = ConnectivityManager.shared
}
}