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

getDailyDistanceWalkingRunningSamples not working #145

Open
anija opened this issue Jan 29, 2020 · 3 comments
Open

getDailyDistanceWalkingRunningSamples not working #145

anija opened this issue Jan 29, 2020 · 3 comments

Comments

@anija
Copy link

anija commented Jan 29, 2020

Hi,

i'm trying to get the dailyDistanceWalkingRunning but i always get an ampty array.

Data is there, and i can access it, because getDistanceWalkingRunning works fine:
AppleHealthKit.getDistanceWalkingRunning({}, (err, res) => console.log(res));
Returns:
{"endDate": "2020-01-29T14:40:00.000+0100", "startDate": "2020-01-29T14:40:00.000+0100", "value": 8046.72}

But the daily aggregate is empty:
AppleHealthKit.getDailyDistanceWalkingRunningSamples({ startDate: "2020-01-01T14:40:00.000+0100", endDate: "2020-01-29T14:40:00.000+0100", limit: 5 }, (err, res) => console.log(res));
[]

I've tried to add the limit, to remove and add again endDate... no luck.
I'm using v0.8.0 on the Emulator.

@akinncar
Copy link

Do you tried to manually add samples in your Simulator?

Go to Health app in your simulator > click in "Health Data" from bottom tab > select "Activity" >select "Walking Running DIstance" in list > Add manually samples

@anija
Copy link
Author

anija commented Feb 21, 2020

Yes, in fact i got the results when using the getDistanceWalkingRunning method.

Anyway, i managed to get the Workouts instead of the Distance and opened a PR to fix a bug about the Workout consents. This library has a lot of problem (logs forgotten, lack of documentation, etc).

@akinncar
Copy link

Yes, working with this lib yesterday, I watched same problems (and anothers) ;/

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

2 participants