GregWilson / react-native-apple-healthkit

A React Native bridge module for interacting with Apple HealthKit data
176 stars 42 forks source link

Workouts, calories and sleep #8

Closed MaximeHeckel closed 4 years ago

MaximeHeckel commented 7 years ago

Hi,

Since iOS 10 (maybe before but I've just noticed the change since then) it's possible to get sleep analysis, is it implemented?

Same question concerning calories and workouts

GregWilson commented 7 years ago

I have added getSleepSamples to retrieve sleep samples. It is available on npm releases v0.2.1+

MaximeHeckel commented 7 years ago

Thank you, I'll give it a try ASAP! And concerning workouts? Does Apple allow you to read them?

MaximeHeckel commented 7 years ago

Just to get a quick update on this since the issue hasn't been closed, are you currently looking into the workout implementation? If not, I can perhaps dive in the code and try to do it (I'm new to swift/obj-c)

henrysik commented 7 years ago

Hi, i would like to ask that is it possible to get calories information such as BasalEnergyBurned and ActiveEnergyBurned for analysis? Thank you!

MaximeHeckel commented 7 years ago

@henrysik as far as I've looked it's not yet implemented (as well as the exercise/workout part) I haven't had the time to dive into the code to contribute sadly but @GregWilson can probably help with that

henrysik commented 7 years ago

@MaximeHeckel Thank you!

ca commented 7 years ago

@henrysik & @MaximeHeckel see PR https://github.com/GregWilson/react-native-apple-healthkit/pull/29 I implemented it and it's simple enough to fork and do on your own if this PR isn't merged

MaximeHeckel commented 7 years ago

@ca nice! this is a great example indeed I'd love to implement a way to get the workouts

markwk commented 7 years ago

Would love to get the Workout Export as well. Still digging into this project among others with react native.

I'm not sure if this is helpful but here is some iOS code for a workout export app: https://github.com/piscoTech/Workout

MaximeHeckel commented 4 years ago

Closing because it's been more than 3 years and this project is not maintained anymore 🤷‍♂ 🙂