HKCategoryValue Enums by Type
30 category types · 28with a named value enum · read from Apple’s documentation on 2026-08-28
28 of HealthKit's 30 category types resolve to a value enum, 2 are honest nulls. What a category sample holds, and why averaging one means nothing.
A HealthKit category sample does not hold a measurement. It holds a value drawn from an enumeration, plus a start date and an end date — and that is the entire payload. 30 of the 240 identifiers in this dataset are category types, and the table on this page pairs each of them with the value enum it resolves to. 28 resolve. Two do not.
The distinction that matters when you write the reading code is between a
type-specific enum and the generic one. sleepAnalysis resolves to
HKCategoryValueSleepAnalysis, menstrualFlow to
HKCategoryValueMenstrualFlow, appleStandHour to
HKCategoryValueAppleStandHour, contraceptive to
HKCategoryValueContraceptive, ovulationTestResult to
HKCategoryValueOvulationTestResult, lowCardioFitnessEvent to
HKCategoryValueLowCardioFitnessEvent. Each of those carries real
alternatives: a sleep sample says which stage, a menstrual flow sample says
how heavy, a stand-hour sample says stood or idle. The value is information.
Then there is plain HKCategoryValue, which is what a type resolves to when
its value has nothing to say. mindfulSession, handwashingEvent,
toothbrushingEvent, sexualActivity, pregnancy, lactation and
intermenstrualBleeding all land here, as do the heart-event types
highHeartRateEvent, lowHeartRateEvent and irregularHeartRhythmEvent, and
the iOS 16.0 cycle-deviation types irregularMenstrualCycles,
infrequentMenstrualCycles, persistentIntermenstrualBleeding and
prolongedMenstrualPeriods. For these the sample's meaning lives entirely in
its type and its time range: these are the .notApplicable types, and reading
the value tells you nothing you did not already know from the query you ran. A
mindfulSession sample means someone meditated, from here until there. There is
no scale.
This is why averaging a category type is not a slightly wrong answer but a
category error. The integer you can pull out of a category sample is an
ordinal — a position in a list of alternatives — and arithmetic on ordinals
produces a number that measures nothing. The mean of a week of menstrualFlow
samples is not a flow. The mean of a month of sleepAnalysis values is not a
sleep quality. What category data supports is counting occurrences, measuring
elapsed time from the start and end dates, taking the latest value, and
grouping by value. If you want a number out of a category type, derive it from
the dates or from the count, never from the value.
Two category types have no value enum resolved in this dataset:
bleedingAfterMenopause and hypertensionEvent. Both are null on purpose.
Resolving these took three passes: taking the first HKCategoryValue* symbol
mentioned on the page resolved 29 of 30 and was wrong, because a cross-linked
symbol on the pregnancy page would have shipped the wrong enum for a type.
Requiring an exact name match resolved far fewer and was structurally biased
against every type whose value is .notApplicable. The rule that shipped
accepts either the type's own matching enum name or the generic enum, which
resolves 28 and leaves two honest nulls. A null here means Apple's page did
not state it in a form the parser could stand behind — not that no enum
exists. That choice, and why guessing the last two would have been worse than
admitting the gap, is written up in building the HealthKit
dataset.
Everything above was parsed from Apple's developer documentation on 2026-08-28 for the HealthKit identifier dataset. Which of these types are beta or otherwise unsettled is on HealthKit type status. For the two category types most products actually read, see sleep tracking APIs, what sleep stages are and the menstrual cycle API.
All 30 category types and the enum that decodes them
Apple names a decoding enum for 28 of the 30 category types. For the remaining 2 — bleedingAfterMenopause, hypertensionEvent — Apple’s page names no matching enum, so the row says so rather than guessing one.
| Category type | Apple’s abstract | Value enum | iOS |
|---|---|---|---|
| appleStandHour | A category sample type that counts the number of hours in the day during which the user has stood and moved for at least one minute per hour. | HKCategoryValueAppleStandHour | 9.0 |
| appleWalkingSteadinessEvent | A category sample type that records an incident where the user showed a reduced score for their gait’s steadiness. | HKCategoryValueAppleWalkingSteadinessEvent | 15.0 |
| audioExposureEvent | A category sample type for audio exposure events. | HKCategoryValueAudioExposureEvent | 13.0 |
| bleedingAfterMenopause | An identifier for samples that record bleeding after menopause. | unresolved — Apple’s page names no matching enum | 27.0 |
| cervicalMucusQuality | A category sample type that records the quality of the user’s cervical mucus. | HKCategoryValueCervicalMucusQuality | 9.0 |
| contraceptive | A category sample type that records the use of contraceptives. | HKCategoryValueContraceptive | 14.3 |
| environmentalAudioExposureEvent | A category sample type that records exposure to potentially damaging sounds from the environment. | HKCategoryValueEnvironmentalAudioExposureEvent | 14.0 |
| handwashingEvent | A category sample type for handwashing events. | HKCategoryValue | 14.0 |
| headphoneAudioExposureEvent | A category sample type that records exposure to potentially damaging sounds from headphones. | HKCategoryValueHeadphoneAudioExposureEvent | 14.2 |
| highHeartRateEvent | A category sample type for high heart rate events. | HKCategoryValue | 12.2 |
| hypertensionEvent | Apple publishes no abstract for this type. | unresolved — Apple’s page names no matching enum | 26.2 |
| infrequentMenstrualCycles | A category sample that indicates an infrequent menstrual cycle. | HKCategoryValue | 16.0 |
| intermenstrualBleeding | A category sample type that records spotting outside the normal menstruation period. | HKCategoryValue | 9.0 |
| irregularHeartRhythmEvent | A category sample type for irregular heart rhythm events. | HKCategoryValue | 12.2 |
| irregularMenstrualCycles | A category sample that indicates an irregular menstrual cycle. | HKCategoryValue | 16.0 |
| lactation | A category type that records lactation. | HKCategoryValue | 14.3 |
| lowCardioFitnessEvent | An event that indicates the user’s VO2 max values consistently fall below a particular aerobic fitness threshold. | HKCategoryValueLowCardioFitnessEvent | 14.3 |
| lowHeartRateEvent | A category sample type for low heart rate events. | HKCategoryValue | 12.2 |
| menopausalState | An identifier for samples that record a person’s menopausal state. | HKCategoryValueMenopausalState | 27.0 |
| menstrualFlow | A category sample type that records menstrual cycles. | HKCategoryValueMenstrualFlow | 9.0 |
| mindfulSession | A category sample type for recording a mindful session. | HKCategoryValue | 10.0 |
| ovulationTestResult | A category sample type that records the result of an ovulation home test. | HKCategoryValueOvulationTestResult | 9.0 |
| persistentIntermenstrualBleeding | A category sample that indicates persistent intermenstrual bleeding. | HKCategoryValue | 16.0 |
| pregnancy | A category type that records pregnancy. | HKCategoryValue | 14.3 |
| pregnancyTestResult | A category type that represents the results from a home pregnancy test. | HKCategoryValuePregnancyTestResult | 15.0 |
| progesteroneTestResult | A category type that represents the results from a home progesterone test. | HKCategoryValueProgesteroneTestResult | 15.0 |
| prolongedMenstrualPeriods | A category sample that indicates a prolonged menstrual cycle. | HKCategoryValue | 16.0 |
| sexualActivity | A category sample type that records sexual activity. | HKCategoryValue | 9.0 |
| sleepAnalysis | A category sample type for sleep analysis information. | HKCategoryValueSleepAnalysis | 8.0 |
| toothbrushingEvent | A category sample type for toothbrushing events. | HKCategoryValue | 13.0 |
What will bite you
The value is an Int, and nothing stops you charting it. A category sample's value arrives as an integer, so it will happily flow through the same rollup code as a step count. Summing or averaging it compiles, runs, and produces a plausible-looking line. Guard this at the boundary: keep category values in a column typed as an enum or a string in your own storage, so that the arithmetic is impossible rather than merely wrong.
Two enums are missing, and inventing them is the failure mode.
bleedingAfterMenopause and hypertensionEvent resolve to nothing here.
bleedingAfterMenopause is a beta type from iOS 27.0 and hypertensionEvent
from iOS 26.2 is listed with no abstract and no discussion at all. If you need
either, read Apple's page for that identifier yourself at the moment you build
against it, and treat any value set you find as current only for that day.
Generic and specific enums are not interchangeable in a switch. Code
written against HKCategoryValue for a handwashing event and copied to read a
menstrualFlow sample will compile against raw integers and silently
mis-label every value. Match on the type's own enum, and make the default
branch of the switch loud rather than a fallback that stores a zero.
Value sets change without the type changing. A category type can stay current while a value inside it is retired or added, and nothing about the identifier's own status will tell you. HealthKit type status covers where that has already happened.
Questions
What is a HealthKit category type?
A type whose samples hold a value from an enumeration plus a start and end date, rather than a number and a unit. 30 of the 240 identifiers in this dataset are category types. A sleep sample says which stage, a stand-hour sample says stood or idle, and an event sample often says nothing beyond the fact that it happened between two times.
Can I average HealthKit category samples?
No, and the arithmetic will not stop you. The integer in a category sample is a position in a list of alternatives, not a measurement, so its mean has no meaning. Count the samples, measure elapsed time from the start and end dates, take the latest value, or group by value instead.
Why do two category types show no value enum?
Because Apple's pages for bleedingAfterMenopause and hypertensionEvent did not state one in a form the parser could stand behind. The dataset stores a null rather than a guess. An earlier rule resolved 29 of 30 by taking the first enum symbol on the page, and it would have shipped the wrong enum for one type.
Derived by AIFitnessAPI from Apple’s published documentation, read 2026-08-28. The full table with units, aggregation and value enums is at every HealthKit type identifier, and the machine-readable export is on datasets.