Closed tsugitta closed 7 years ago
sorry I didn't read apple's document well.
@tsugitta Can you explain how you got around this? I'm pretty new to RN and am trying to figure this out too...thanks!
@kh1990
I created this issue because I think it's possible to know whether the user's reading permission is denied or not by using authorizationStatus(for:)
. but I figured out it's impossible as Apple says
This method checks the authorization status for saving data.
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.
I closed this issue because I'd just like to get reading permission and it turned out impossible, but someone may need authorizationStatus(for:)
to get saving permission (but it can be gotten by current library's saving method because it should show errors when saving).
Ahh I understand your original comment now. Yeah i wonder if it can be tested say saving a 0.0001 step add? and then deleting it? lol
https://developer.apple.com/reference/healthkit/hkhealthstore/1614154-authorizationstatus
README saids
but I think if I can know whether the permission was denied or the data was nil by using
authorizationStatus(for:)
. so I wish I could use this.. is it implemented?thanks.