Commit 72126472 authored by Greg Wilson's avatar Greg Wilson

updated readme

parent d5f10e70
...@@ -197,8 +197,42 @@ AppleHealthKit.initHealthKit(options: Object, (err: string, res: Object) => { ...@@ -197,8 +197,42 @@ AppleHealthKit.initHealthKit(options: Object, (err: string, res: Object) => {
___ ___
#### **`getBiologicalSex`**
get the biological sex (gender). if the `BiologicalSex` read permission is missing or the user has denied it then the value will be `unknown`. the possible values are:
| Value | HKBiologicalSex |
|---------|-----------------------|
| unknown | HKBiologicalSexNotSet |
| male | HKBiologicalSexMale |
| female | HKBiologicalSexFemale |
| other | HKBiologicalSexOther |
```javascript
AppleHealthKit.getBiologicalSex(null, (err: Object, bioSex: string) => {
if(this._handleHealthKitError(err, 'getBiologicalSex')){
return;
}
// use bioSex ...
});
```
___
#### **`getDateOfBirth`**
get the date of birth. this will be an ISO timestamp
```javascript
AppleHealthKit.getDateOfBirth(null, (err: Object, dob: string) => {
if(this._handleHealthKitError(err, 'getDateOfBirth')){
return;
}
// use dob ...
});
```
___
#### **`getStepCountForToday`** #### **`getStepCountForToday`**
get the the aggregated total steps for the current day starting and ending at midnight get the aggregated total steps for the current day starting and ending at midnight
```javascript ```javascript
AppleHealthKit.getStepCountForToday(null, (err: Object, steps: number) => { AppleHealthKit.getStepCountForToday(null, (err: Object, steps: number) => {
if(this._handleHealthKitError(err, 'getStepCountForToday')){ if(this._handleHealthKitError(err, 'getStepCountForToday')){
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment