Contents

menstrualFlow

A category sample type that records menstrual cycles.

Declaration

static let menstrualFlow: HKCategoryTypeIdentifier

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 true.

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 true. Use false for any additional samples. Different samples can use different menstrualFlow values to record the changes in flow over time.

Topics

Metadata Keys

See Also

Related Documentation

Reproductive health