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

Add workout (read / write) cholesterol (read) authorization check for each health kit type #41

Open
wants to merge 13 commits into
base: master
Choose a base branch
from

Conversation

AFGhazy
Copy link

@AFGhazy AFGhazy commented May 31, 2018

Add workout (read / write) cholesterol (read) authorization check for each health kit type.

@AFGhazy AFGhazy changed the title Add authorization check for each health kit type Add workout (read / write) cholesterol (read) authorization check for each health kit type May 31, 2018
@JulianKingman
Copy link

@terrillo this looks super useful, could you merge this?

@JulianKingman
Copy link

JulianKingman commented Jun 28, 2018

@AFGhazy I get an error when using getAuthStatus
usage:

AppleHealthKit.getAuthStatus((err, res) => console.log(err, res));

error:

AppleHealthKit.getAuthStatus was called with 1 argument but expects 2 arguments. If you haven't changed this method yourself, this usually means that your versions of the native code and JavaScript code are out of sync. Updating both should make this error go away.

@JulianKingman
Copy link

JulianKingman commented Jun 28, 2018

I see, it requires a permission object. Is that the same as the Permissions in the AppleHealthKit.Constants?
Edit: I get how it works now, just like initHealthKit.

@matthewyuhk01
Copy link

I think this is very useful. Can it be merged?

@mazenchami
Copy link

mazenchami commented Dec 24, 2018

@AFGhazy any update on the documentation (and fixing the README.md conflict) and merging with master?
@terrillo thoughts?

@AFGhazy
Copy link
Author

AFGhazy commented Dec 26, 2018

@mazenchami I have resolved the conflicts and @terrillo has access to edit the pull request, have a great day.

@adbl adbl mentioned this pull request Dec 29, 2018
@gamsim
Copy link

gamsim commented Feb 28, 2019

simulator screen shot - iphone 8 - 2019-02-28 at 15 51 53

Getting an error which I can't resolve...any help would be appreciated...

function collectWorkout(date) {
return new Promise((resolve) => {
const startDate = moment(date).format(isoFormat);
AppleHealthKit.getWorkout({ startDate }, (error, result) => {
console.log(result);
resolve();
});
});
}

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

Successfully merging this pull request may close these issues.

None yet

5 participants