Relative Content

Tag Archive for swifthealthkit

HKAuthorizationStatus for HKWorkoutRouteTypeIdentifier Always Returning .notDetermined After Granting Access

I am using HKHealthStore to request authorization for both HKWorkoutTypeIdentifier and HKWorkoutRouteTypeIdentifier. After the authorization is granted, I am trying to check the authorization status using authorizationStatus(for:), but it always returns HKAuthorizationStatus(rawValue: 0) (which corresponds to .notDetermined). Despite successfully granting access, the status does not reflect the change.
Here’s the code I’m using:

HKAuthorizationStatus for HKWorkoutRouteTypeIdentifier Always Returning .notDetermined After Granting Access

I am using HKHealthStore to request authorization for both HKWorkoutTypeIdentifier and HKWorkoutRouteTypeIdentifier. After the authorization is granted, I am trying to check the authorization status using authorizationStatus(for:), but it always returns HKAuthorizationStatus(rawValue: 0) (which corresponds to .notDetermined). Despite successfully granting access, the status does not reflect the change.
Here’s the code I’m using:

Retrieve a Data from HealthKit

I am working on an application related to Heart Rate Variability. To complete a step, I need the data that can be found in “Heart Rate Interval Measurements” located in HealthKit by pressing on the value returned in the variability section (the specific value is SDNN). The data I would like are those in the photo. Is it possible to retrieve them using Swift? I have been trying for a week without results.