---
title: HKHeartbeatSeriesSample
framework: healthkit
role: symbol
role_heading: Class
path: healthkit/hkheartbeatseriessample
---

# HKHeartbeatSeriesSample

A sample that represents a series of heartbeats.

## Declaration

```swift
class HKHeartbeatSeriesSample
```

## Overview

Overview Use a HKHeartbeatSeriesQuery to access the underlying heartbeat data. The HKHeartbeatSeriesSample class is a subclass of the HKSeriesSample class. These samples are immutable; you set the sample’s properties when you build them, and they can’t change. Extend Heartbeat Samples Like many HealthKit classes, you shouldn’t subclass the HKHeartbeatSeriesSample class. You may extend this class by adding metadata with custom keys to save related data used by your app. For more information, see addMetadata(_:completion:).

## Topics

### Metadata

- [HKMetadataKeyAlgorithmVersion](healthkit/hkmetadatakeyalgorithmversion.md)

## Relationships

### Inherits From

- [HKSeriesSample](healthkit/hkseriessample.md)

### Conforms To

- [CVarArg](swift/cvararg.md)
- [CustomDebugStringConvertible](swift/customdebugstringconvertible.md)
- [CustomStringConvertible](swift/customstringconvertible.md)
- [Equatable](swift/equatable.md)
- [Hashable](swift/hashable.md)
- [NSCoding](foundation/nscoding.md)
- [NSObjectProtocol](objectivec/nsobjectprotocol.md)
- [NSSecureCoding](foundation/nssecurecoding.md)
- [Sendable](swift/sendable.md)
- [SendableMetatype](swift/sendablemetatype.md)

## See Also

### Series data

- [HKQuantitySeriesSampleBuilder](healthkit/hkquantityseriessamplebuilder.md)
- [HKHeartbeatSeriesBuilder](healthkit/hkheartbeatseriesbuilder.md)
