0

I am handle an iOS app and use data from health kit. When I move to setting and disabled steps component, I want to check that status in my app. I tried authorizationStatus but result is alway sharingDenied. Please support me to check it.

lam le
  • 1

1 Answers1

0

If user disables steps from: Settings -> Privacy -> Health -> Your App -> disable Steps switch

It means that the user is not allowing the app to access steps data which implies that sharing is denied.

This is why the HKAuthorizationStatus is sharingDenied.

You can read the details here - https://developer.apple.com/documentation/healthkit/hkauthorizationstatus?language=objc

Olle Ekberg
  • 804
  • 8
  • 11
vk0425
  • 36
  • 1
  • thank for your reply. I just referred and the document remind that: _HealthKit does not tell you when the user denies your app permission to query data_ – lam le Jun 01 '22 at 14:46