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

how use rn-apple-healthkit #3

Closed
jrz90000 opened this issue Sep 19, 2017 · 2 comments
Closed

how use rn-apple-healthkit #3

jrz90000 opened this issue Sep 19, 2017 · 2 comments

Comments

@jrz90000
Copy link

hello
i am use rn-apple-healthkit,system Prompt :

_rnAppleHealthkit2.default.getBiologicalSex is not a function. (In '_rnAppleHealthkit2.default.getBiologicalSex', '_rnAppleHealthkit2.default.getBiologicalSex' is undefined)

componentDidMount
    index.ios.js:43:40
measureLifeCyclePerf
    ReactNativeStack-dev.js:1610:15
<unknown>
    ReactNativeStack-dev.js:1657:33
notifyAll
    ReactNativeStack-dev.js:2121:107
close
    ReactNativeStack-dev.js:2138:8
closeAll
    ReactNativeStack-dev.js:1412:101
perform
    ReactNativeStack-dev.js:1388:52
batchedMountComponentIntoNode
    ReactNativeStack-dev.js:2004:24
perform
    ReactNativeStack-dev.js:1382:99
renderComponent
    ReactNativeStack-dev.js:2032:45
renderApplication
    renderApplication.js:34:4
runApplication
    AppRegistry.js:191:26
__callFunction
    MessageQueue.js:306:47
<unknown>
    MessageQueue.js:108:26
__guard
    MessageQueue.js:269:6
callFunctionReturnFlushedQueue
    MessageQueue.js:107:17

How should I get the data?

I am index.ios.js inside ,Next, how do I get the data?

import AppleHealthKit from 'rn-apple-healthkit';
let options = {
    permissions: {
        read: ["Height", "Weight", "StepCount", "DateOfBirth", "BodyMassIndex"],
        write: ["Weight", "StepCount", "BodyMassIndex"]
    }
};

@terrillo
Copy link
Collaborator

@jrz90000 checkout the WIKI. https://github.com/terrillo/rn-apple-healthkit/wiki

AppleHealthkit.getBiologicalSex(null, (err: Object, results: Object) => {
    if (this._handleHealthkitError(err, 'getBiologicalSex')) {
      return;
    }
    console.log(results)
});

@jrz90000
Copy link
Author

thanks you ,I've solved it. It should have been a Xcode configuration

notozeki referenced this issue in BeatFit-Dev/rn-apple-healthkit Dec 20, 2018
Remove dependencies over literals and change method names
AdamJB pushed a commit to caliberstrong/rn-apple-healthkit that referenced this issue Aug 21, 2020
Chore: Protect from Apple adding new workout types that we don't support
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants