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:
@@ -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
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user