Enumeration

HKCategoryValueSleepAnalysis

Categories used when analyzing sleep samples.

Declaration

typedef enum HKCategoryValueSleepAnalysis : NSInteger {
    ...
} HKCategoryValueSleepAnalysis;

Overview

Each sleep analysis sample can have only one value. To represent the user being both in bed and asleep, HealthKit uses two or more samples with overlapping times.

By comparing the start and end times of these samples, apps can calculate a number of secondary statistics: the amount of time it took for the user to fall asleep, the percentage of time in bed that the user actually spent sleeping, the number of times the user woke while in bed, and the total amount of time spent both in bed and asleep.

Topics

Constants

See Also

Assigning Values

HKCategoryValue

Miscellaneous category values.

HKCategoryValueCervicalMucusQuality

Categories used to represent the user’s cervical mucus quality.

HKCategoryValueMenstrualFlow

Categories indicating the amount of menstrual flow for a given sample.

HKCategoryValueOvulationTestResult

Categories used to represent the result of an ovulation home test.

HKCategoryValueAudioExposureEvent

Categories indicating audio exposure events.