Instance Method

biologicalSexWithError:

Reads the user’s biological sex from the HealthKit store.

Declaration

- (HKBiologicalSexObject *)biologicalSexWithError:(NSError * _Nullable *)error;

Parameters

error

On input, a pointer to an error object. If an error occurs, this pointer is set to an actual error object containing information about the error. Specify nil for this parameter if you do not want to receive error information.

Return Value

A biological sex object containing information about the user’s biological sex.

Discussion

If the user has not yet set his or her biological sex or if they have denied your app permission to read the biological sex, this method returns an HKBiologicalSexNotSet value.

Topics

Possible Values

HKBiologicalSexObject

This class acts as a wrapper for the HKBiologicalSex enumeration.

HKBiologicalSex

Constants indicating the user’s sex.

See Also

Reading Characteristic Data

- bloodTypeWithError:

Reads the user’s blood type from the HealthKit store.

- dateOfBirthWithError:

Reads the user’s date of birth from the HealthKit store.

Deprecated
- dateOfBirthComponentsWithError:

Reads the user’s date of birth from the HealthKit store.

- fitzpatrickSkinTypeWithError:

Reads the user’s Fitzpatrick Skin Type from the HealthKit store.

- wheelchairUseWithError:

Reads the user’s wheelchair use from the HealthKit store.

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software