Instance Method

biologicalSex()

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

Declaration

func biologicalSex() throws -> HKBiologicalSexObject

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 notSet value.

Topics

Possible Values

class HKBiologicalSexObject

This class acts as a wrapper for the HKBiologicalSex enumeration.

enum HKBiologicalSex

Constants indicating the user’s sex.

See Also

Reading Characteristic Data

func bloodType()

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

func dateOfBirth()

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

Deprecated
func dateOfBirthComponents()

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

func fitzpatrickSkinType()

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

func wheelchairUse()

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