airmed-dev / meals

Meals is a meal tracker for people with type 1 diabetes
MIT License
6 stars 0 forks source link

HealthKit's Authorization isn't reflected in the settings page #17

Closed airmed-dev closed 2 years ago

airmed-dev commented 2 years ago

In the settings page, the "Authorized" block doesn't show "true" when in fact it is authorized.

airmed-dev commented 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