I'm using HealthKit to read certain types of information. I'm specifically not asking for write functionality. The problem comes in when trying to detect if the user has allowed a certain Health type to be read.
I believe the intended way to do this is using an HKHealthStore's authorizationStatusForType method, but this is only returned denied or unknown. It is only returning authorized for write types. Has anyone found a way to use this method for reading or another work around?
HKQuantityType *stepsType = [HKQuantityType quantityTypeForIdentifier:HKQuantityTypeIdentifierHeight];
HKAuthorizationStatus status = [self.healthStore authorizationStatusForType:stepsType];
It collects health and fitness data from your iPhone, the built-in sensors on your Apple Watch, compatible third-party devices, and apps that use HealthKit. The Health app is built to keep your data secure and protect your privacy. Your data is encrypted and you are always in control of your health information.
HealthKit provides a central repository for health and fitness data on iPhone and Apple Watch. With the user's permission, apps communicate with the HealthKit store to access and share this data.
Open the Health app. Tap your profile , then tap Devices. Tap your Apple Watch. Tap Privacy Settings and make sure Fitness Tracking is turned on.
For privacy reasons, you are unable to view your application's read authorization status for a particular type.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With