Global Variable

HKCategoryTypeIdentifierMenstrualFlow

A category sample type for representing menstrual cycles.

Declaration

const HKCategoryTypeIdentifier HKCategoryTypeIdentifierMenstrualFlow;

Discussion

These samples use values from the HKCategoryValueMenstrualFlow enum. Additionally, these samples must include HKMetadataKeyMenstrualCycleStart metadata.

When recording data about the user’s menstrual cycle, you can either use a single sample for the entire period, or multiple samples to record changes over the cycle. When using single samples, pass the start of the menstrual period to the startDate parameter. Pass the end of the period to the endDate parameter, and set the HKMetadataKeyMenstrualCycleStart value to YES.

When using multiple samples to record a single period, the startDate and endDate parameters should mark the beginning and ending of each individual sample. Set the HKMetadataKeyMenstrualCycleStart value for the first sample in the period to YES. Use NO for any additional samples. Different samples can use different menstrualFlow values to record the changes in flow over time.

Topics

Metadata Keys

HKMetadataKeyMenstrualCycleStart

A key that indicates whether the sample represents the start of a menstrual cycle. This metadata key is required for HKCategoryTypeIdentifierMenstrualFlow category samples.

See Also

Reproductive Health

HKCategoryTypeIdentifierSexualActivity

A category sample type for recording sexual activity.

HKCategoryTypeIdentifierIntermenstrualBleeding

A category sample type for representing spotting outside the normal menstruation period.

HKCategoryTypeIdentifierOvulationTestResult

A category sample type for recording the result of an ovulation home test.

HKCategoryTypeIdentifierCervicalMucusQuality

A category sample type for representing the quality of the user’s cervical mucus.

HKQuantityTypeIdentifierBasalBodyTemperature

A quantity sample type that measures the user’s basal body temperature.