react-native-healthkit icon indicating copy to clipboard operation
react-native-healthkit copied to clipboard

setting NSHealthUpdateUsageDescription to true breaks requestAuthorization 'Authorization session timed out'

Open arapocket opened this issue 1 year ago • 2 comments

I've already read through https://github.com/kingstinct/react-native-healthkit/issues/86.

I don't really have a use-case for write permissions yet but this does concern me for later. I'm not doing anything fancy with my code, just whatever is in the readme.

The functionality all works perfectly when NSHealthUpdateUsageDescription is set to false.

To be clear I am only requesting read permissions. Asking for write permissions gets me the unrecognized selector crash (probably same issue as https://github.com/kingstinct/react-native-healthkit/issues/128)

Edit: i didn't specify before that I was using expo

arapocket avatar Feb 12 '25 01:02 arapocket

So it looks like you have to set it to a string for it to work. I'm unable to set it to false because doing an expo prebuild omits the value completely, and apple will reject it without any value.

arapocket avatar Feb 21 '25 08:02 arapocket

This should be fixed in v9, even though adding your own string gives you more control over the behaviour.

robertherber avatar Jun 17 '25 11:06 robertherber