Closed airmed-dev closed 2 years ago
This actually can't be accomplished. HealthKit is preventing from getting the 'read' authorization status.
To help prevent possible leaks of sensitive health information, your app cannot determine whether or not a user has granted permission to read data. If you are not given permission, it simply appears as if there is no data of the requested type in the HealthKit store. If your app is given share permission but not read permission, you see only the data that your app has written to the store. Data from other sources remains hidden
https://developer.apple.com/documentation/healthkit/hkhealthstore/1614154-authorizationstatus
In the settings page, the "Authorized" block doesn't show "true" when in fact it is authorized.