This commit is contained in:
Trey t
2024-07-02 11:46:09 -05:00
parent cedab87193
commit bfb373c8af
5 changed files with 15 additions and 9 deletions

View File

@@ -30,9 +30,10 @@ class WatchDelegate: NSObject, WKApplicationDelegate {
HKObjectType.quantityType(forIdentifier: .heartRate)!,
HKObjectType.quantityType(forIdentifier: .activeEnergyBurned)!,
HKObjectType.quantityType(forIdentifier: .oxygenSaturation)!,
HKObjectType.activitySummaryType(),
HKQuantityType.workoutType()
]
HKHealthStore().requestAuthorization(toShare: healthKitTypes, read: healthKitTypes) { (succ, error) in
HKHealthStore().requestAuthorization(toShare: nil, read: healthKitTypes) { (succ, error) in
if !succ {
fatalError("Error requesting authorization from health store: \(String(describing: error)))")
}