Global Variable


A category sample type for representing menstrual cycles.


const HKCategoryTypeIdentifier HKCategoryTypeIdentifierMenstrualFlow;


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.


Metadata Keys


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


A category sample type for recording sexual activity.


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


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


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


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