stepCount: HealthKit quantity type
HKQuantityTypeIdentifierStepCount · read from Apple’s documentation on 2026-10-02
HKQuantityTypeIdentifier.stepCount (Objective-C HKQuantityTypeIdentifierStepCount) is a HealthKit quantity type in Apple's "Activity" group. Apple's abstract: “A quantity sample type that measures the number of steps the user has taken.” Apple's discussion says its samples use count units and measure cumulative values, so in HKStatisticsQuery it takes .cumulativeSum. It is available from iOS 8.0 and watchOS 2.0. This site's verified cross-platform matrix lists it in its Steps row, beside StepsRecord, StepsCadenceRecord on Android Health Connect, with the caveat “De-duplicate: phone and watch both write steps.”
What Apple says stepCount is
A quantity sample type that measures the number of steps the user has taken.
Apple’s abstract, quoted from its stepCount reference page, read 2026-10-02. Apple’s discussion of the type runs 39 words.
- Swift
HKQuantityTypeIdentifier.stepCount- Objective-C
HKQuantityTypeIdentifierStepCount- Family
HKQuantityTypeIdentifier- Apple's topic group
- Activity
- Group page
- Activity
- Apple's reference
- stepCount on developer.apple.com
Availability
The versions Apple’s documentation data gives for stepCount, platform by platform, as read on 2026-10-02.
| Platform | Introduced | Deprecated |
|---|---|---|
| iOS | 8.0 | — |
| iPadOS | 8.0 | — |
| Mac Catalyst | 13.0 | — |
| macOS | 13.0 | — |
| visionOS | 1.0 | — |
| watchOS | 2.0 | — |
The rest of that release: HealthKit Types Introduced in iOS 8.
Sum or average, and in which units
Apple states both of these in the prose of the type’s discussion, not as properties, so they are derived from Apple’s sentence and the sentence is shown with each.
Aggregation style
cumulative — in an HKStatisticsQuery, use .cumulativeSum. Apple’s sentence:
These samples use count units (described in ) and measure cumulative values (described in ).
Unit family
count — every type in this family is on the HKUnit reference.
Apple states it in the same sentence as the aggregation style, quoted above.
Empty parentheses and a dangling “described in” mark links in Apple’s sentence to other documentation pages: the generator keeps the sentence’s text, not its links, and the quote is left as stored rather than repaired.
Can apps write stepCount?
Apple’s documentation for stepCount does not state that its samples are read-only. Apple states read-only status only in prose, and its silence is not a statement either way, so this page makes no claim that apps can save it.
On Android Health Connect
stepCount sits in the verified cross-platform matrix’s Steps row, which names HKQuantityTypeIdentifier.stepCount (CMPedometer for live counts) on Apple and StepsRecord, StepsCadenceRecord on Android. The row groups the metric; it does not pair each Apple type with one Android record.
De-duplicate: phone and watch both write steps. On Android, from the June 2026 update on-device steps are attributed to a per-device Synthetic Package Name — read it via getCurrentDeviceDataSource(), never hardcode it.
The metric guide for this row: Steps on every platform.
Questions
- Should I sum or average stepCount in HealthKit?
- Sum it. Apple's documentation for stepCount describes it as measuring cumulative values, so an HKStatisticsQuery over it takes .cumulativeSum. Apple's sentence, as read on 2026-10-02: "These samples use count units (described in ) and measure cumulative values (described in )."
- Which unit family does Apple give stepCount?
- Count. Apple's discussion of stepCount says its samples use count units: "These samples use count units (described in ) and measure cumulative values (described in )."
- Does stepCount have a Health Connect equivalent?
- This site's verified cross-platform matrix lists stepCount in its Steps row, which groups HKQuantityTypeIdentifier.stepCount (CMPedometer for live counts) on Apple with StepsRecord, StepsCadenceRecord on Android; the row groups the metric and does not pair each Apple type with one Android record. The caveat recorded with that row: De-duplicate: phone and watch both write steps. On Android, from the June 2026 update on-device steps are attributed to a per-device Synthetic Package Name — read it via getCurrentDeviceDataSource(), never hardcode it.
- Which iOS version added stepCount?
- iOS 8.0. Apple's availability data for stepCount lists iOS 8.0, iPadOS 8.0, Mac Catalyst 13.0, macOS 13.0, visionOS 1.0 and watchOS 2.0.
Sources checked
- Apple — HKQuantityTypeIdentifier.stepCount · read 2026-10-02
- Apple — HKQuantityTypeIdentifier · read 2026-10-02
Apple’s abstract and sentences are quoted for identification; the page layout, the capsule and the cross-platform pairing are AIFitnessAPI’s. Generated from Apple’s documentation by scripts/fetch-healthkit-identifiers.mjs, not typed by hand — the same data as the full identifier table.