WIP
This commit is contained in:
@@ -50,8 +50,7 @@ class BridgeModule: NSObject, ObservableObject {
|
||||
// workoutEndDate fills out WatchPackageModel.workoutEndDate which
|
||||
// tells the watch app to stop the workout
|
||||
public private(set) var workoutEndDate: Date?
|
||||
public private(set) var totalCaloire: Float?
|
||||
public private(set) var heartRates: [Int]?
|
||||
public private(set) var healthKitUUID: UUID?
|
||||
|
||||
var audioPlayer: AVAudioPlayer?
|
||||
var avPlayer: AVPlayer?
|
||||
@@ -315,8 +314,7 @@ extension BridgeModule: WCSessionDelegate {
|
||||
playFinished()
|
||||
case .workoutComplete(let data):
|
||||
let model = try! JSONDecoder().decode(WatchFinishWorkoutModel.self, from: data)
|
||||
totalCaloire = Float(model.totalBurnedEnergery)
|
||||
heartRates = model.allHeartRates
|
||||
healthKitUUID = model.healthKitUUID
|
||||
completedWorkout?()
|
||||
case .restartExercise:
|
||||
restartExercise()
|
||||
|
||||
Reference in New Issue
Block a user