getBiologicalSex().md 632 Bytes
Newer Older
1 2 3 4 5 6 7 8 9 10
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
Terrillo Walls's avatar
Terrillo Walls committed
11
AppleHealthKit.getBiologicalSex(null, (err: Object, results: Object) => {
12 13 14 15 16 17 18 19 20 21 22 23
    if (this._handleHealthkitError(err, 'getBiologicalSex')) {
      return;
    }
    console.log(results)
});
```

```javascript
{
   value: 'female',
}
```