Skip to content

Accept different units on the getWaterSamples function #365

Open
@caiofelipe97

Description

@caiofelipe97

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions