Merge develop -> main: full session (KC-51 through KC-71) #28
@@ -168,7 +168,7 @@ final class HealthKitManager: ObservableObject {
|
||||
func dailyReference(from start: Date, to end: Date) async -> [String: (steps: Int?, calories: Int?, restingHR: Int?)] {
|
||||
guard authorized, isAvailable else { return [:] }
|
||||
let anchor = Calendar.current.startOfDay(for: start)
|
||||
var interval = DateComponents(); interval.day = 1
|
||||
let interval = DateComponents(day: 1)
|
||||
|
||||
async let steps = statsCollection(.stepCount, unit: .count(), options: .cumulativeSum, anchor: anchor, end: end, interval: interval)
|
||||
async let cals = statsCollection(.activeEnergyBurned, unit: .kilocalorie(), options: .cumulativeSum, anchor: anchor, end: end, interval: interval)
|
||||
|
||||
Reference in New Issue
Block a user