Instance Method

dateOfBirthComponentsWithError:

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

Declaration

- (NSDateComponents *)dateOfBirthComponentsWithError:(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

An NSDateComponents object representing the user’s birthdate in the Gregorian calendar, or nil.

Discussion

If the user has not yet specified a birth date, or if the user has denied your app permission to read the birth date, this method returns nil.

See Also

Reading Characteristic Data

- biologicalSexWithError:

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

- bloodTypeWithError:

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

- dateOfBirthWithError:

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

Deprecated
- fitzpatrickSkinTypeWithError:

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

- wheelchairUseWithError:

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