Skip to content
This repository has been archived by the owner on Oct 20, 2023. It is now read-only.

Latest commit

 

History

History
23 lines (20 loc) · 632 Bytes

getBiologicalSex().md

File metadata and controls

23 lines (20 loc) · 632 Bytes

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
AppleHealthKit.getBiologicalSex(null, (err: Object, results: Object) => {
    if (this._handleHealthkitError(err, 'getBiologicalSex')) {
      return;
    }
    console.log(results)
});
{
   value: 'female',
}