Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Permission error for getWorkoutRoutes() #87

Open
JordanHe opened this issue Feb 28, 2024 · 0 comments
Open

Permission error for getWorkoutRoutes() #87

JordanHe opened this issue Feb 28, 2024 · 0 comments

Comments

@JordanHe
Copy link

I have noticed a strange issue with the Apple Health permissions for when trying to use the Native.getWorkoutRoutes(currentRun.uuid)

What happens is the user accepts permissions to access
"HKWorkoutTypeIdentifier" and "HKWorkoutRouteTypeIdentifier"

the getWorkoutRoutes works for a few days but then it just returns null after that for some users.
I have been able to reproduce this on my device as well and when I navigate to Apple Health app and go to the workouts section and scroll to the bottom and view the following permissions:
Data Sources and Access
Workout Route Data Sources & Access

They are both turned on for my app.

The strange thing is if I unselect the permission and turn it back on again then when I try and call getWorkoutRoutes again it begins to work again. Long term though this isn't really a viable solution to expect the user to turn off and turn on the permission each time so maybe theres an issue with how this function checks the permission as it is already enabled in Apple Health but only works when you toggle it off and on again.

I don't really have any logs to help debug this issue so apologies for that but hopefully that is enough to investigate.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant