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

Accept different units on the getWaterSamples function #365

Open
caiofelipe97 opened this issue Feb 20, 2024 · 0 comments · May be fixed by #366
Open

Accept different units on the getWaterSamples function #365

caiofelipe97 opened this issue Feb 20, 2024 · 0 comments · May be fixed by #366
Labels
bug Something isn't working

Comments

@caiofelipe97
Copy link

Describe the bug
The getWaterSamples doesn't accept different units even though the documentation says it does. (https://github.com/agencyenterprise/react-native-health/blob/master/docs/getWaterSamples.md)

To Reproduce
Steps to reproduce the behavior:

  1. Call AppleHealthKit.getWaterSamples with the unit within the options object. e.g.:
    const waterSamplesOptions: HealthInputOptions = { startDate: user?.created_at, unit: 'fluidOunceUS'};
  2. See that even changing the unit value, it will always return as literUnit. Besides, neither 'fluidOunceUS' or 'liter' are valid

Expected behavior
It should return the water samples based on the unit value

Additional context
I want to get the fluidounces type instead of liter, and I'd like to retrieve it from the health kit instead of parsing the data.

@caiofelipe97 caiofelipe97 added the bug Something isn't working label Feb 20, 2024
@caiofelipe97 caiofelipe97 linked a pull request Feb 20, 2024 that will close this issue
5 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant