Skip to content
AF
HealthKit reference

heartRate: HealthKit quantity type

HKQuantityTypeIdentifierHeartRate · read from Apple’s documentation on 2026-10-02

HKQuantityTypeIdentifier.heartRate (Objective-C HKQuantityTypeIdentifierHeartRate) is a HealthKit quantity type in Apple's "Vital signs" group. Apple's abstract: “A quantity sample type that measures the user’s heart rate.” Apple's discussion says its samples use count/time units and measure discrete values, so in HKStatisticsQuery it takes .discreteAverage, .discreteMin or .discreteMax. It is available from iOS 8.0 and watchOS 2.0. This site's verified cross-platform matrix lists it in its Heart rate row, beside HeartRateRecord, RestingHeartRateRecord on Android Health Connect, with the caveat “Both expose samples plus a separate resting value — don't derive resting yourself.”

What Apple says heartRate is

A quantity sample type that measures the user’s heart rate.

Apple’s abstract, quoted from its heartRate reference page, read 2026-10-02. Apple’s discussion of the type runs 185 words.

Swift
HKQuantityTypeIdentifier.heartRate
Objective-C
HKQuantityTypeIdentifierHeartRate
Family
HKQuantityTypeIdentifier
Apple's topic group
Vital signs
Group page
Vital signs

Availability

The versions Apple’s documentation data gives for heartRate, platform by platform, as read on 2026-10-02.

PlatformIntroducedDeprecated
iOS8.0—
iPadOS8.0—
Mac Catalyst13.0—
macOS13.0—
visionOS1.0—
watchOS2.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

discrete — in an HKStatisticsQuery, use .discreteAverage, .discreteMin or .discreteMax. Apple’s sentence:

These samples use count/time units (described in ) and measure discrete values (described in ).

Unit family

count/time — 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 heartRate?

Apple’s documentation for heartRate 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

heartRate sits in the verified cross-platform matrix’s Heart rate row, which names HKQuantityTypeIdentifier.heartRate, .restingHeartRate on Apple and HeartRateRecord, RestingHeartRateRecord on Android. The row groups the metric; it does not pair each Apple type with one Android record.

The matrix’s caveat for this row:
Both expose samples plus a separate resting value — don't derive resting yourself.

The metric guide for this row: Heart rate on every platform.

Questions

Should I sum or average heartRate in HealthKit?
Average it, or take its minimum or maximum — do not sum it. Apple's documentation for heartRate describes it as measuring discrete values, so an HKStatisticsQuery over it takes .discreteAverage, .discreteMin or .discreteMax. Apple's sentence, as read on 2026-10-02: "These samples use count/time units (described in ) and measure discrete values (described in )."
Which unit family does Apple give heartRate?
Count/time. Apple's discussion of heartRate says its samples use count/time units: "These samples use count/time units (described in ) and measure discrete values (described in )."
Does heartRate have a Health Connect equivalent?
This site's verified cross-platform matrix lists heartRate in its Heart rate row, which groups HKQuantityTypeIdentifier.heartRate, .restingHeartRate on Apple with HeartRateRecord, RestingHeartRateRecord on Android; the row groups the metric and does not pair each Apple type with one Android record. The caveat recorded with that row: Both expose samples plus a separate resting value — don't derive resting yourself.
Which iOS version added heartRate?
iOS 8.0. Apple's availability data for heartRate lists iOS 8.0, iPadOS 8.0, Mac Catalyst 13.0, macOS 13.0, visionOS 1.0 and watchOS 2.0.

Sources checked

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.

← All HealthKit type identifiers · Vital signs