<!--
{
  "availability" : [
    "iOS: 17.4.0 -",
    "iPadOS: 17.4.0 -",
    "macCatalyst: 17.4.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "SensorKit",
  "identifier" : "/documentation/SensorKit/SRElectrocardiogramSample",
  "metadataVersion" : "0.1.0",
  "role" : "Class",
  "symbol" : {
    "kind" : "Class",
    "modules" : [
      "SensorKit"
    ],
    "preciseIdentifier" : "c:objc(cs)SRElectrocardiogramSample"
  },
  "title" : "SRElectrocardiogramSample"
}
-->

# SRElectrocardiogramSample

The sample electrocardiogram sensor data.

```
class SRElectrocardiogramSample
```

## Overview

The electrocardiogram (ECG) sensor provides an array of these objects as its [`sample`](/documentation/SensorKit/SRFetchResult/sample) type.

## Topics

### Accessing ECG data

[`var date: Date`](/documentation/SensorKit/SRElectrocardiogramSample/date)

The start date of the ECG sensor data recording, not the start of the session.

[`var frequency: Measurement<UnitFrequency>`](/documentation/SensorKit/SRElectrocardiogramSample/frequency)

The frequency in hertz that the ECG sensor records the data.

[`var lead: SRElectrocardiogramSample.Lead`](/documentation/SensorKit/SRElectrocardiogramSample/lead-swift.property)

The lead used to record the ECG data.

[`enum Lead`](/documentation/SensorKit/SRElectrocardiogramSample/Lead-swift.enum)

The location of the lead that a person uses to record the ECG data.

[`var session: SRElectrocardiogramSession`](/documentation/SensorKit/SRElectrocardiogramSample/session)

The session where this sample occurs.

[`class SRElectrocardiogramSession`](/documentation/SensorKit/SRElectrocardiogramSession)

An object that represents ECG data that a device records during a period of time.

[`var data: [SRElectrocardiogramData]`](/documentation/SensorKit/SRElectrocardiogramSample/data)

The data that the sensor records.

[`class SRElectrocardiogramData`](/documentation/SensorKit/SRElectrocardiogramData)

A representation of the ECG data that the sensor records.

## Relationships

### Conforms To

[`Hashable`](/documentation/Swift/Hashable)

[`CustomDebugStringConvertible`](/documentation/Swift/CustomDebugStringConvertible)

[`Sendable`](/documentation/Swift/Sendable)

[`NSCoding`](/documentation/Foundation/NSCoding)

[`Equatable`](/documentation/Swift/Equatable)

[`CustomStringConvertible`](/documentation/Swift/CustomStringConvertible)

[`SendableMetatype`](/documentation/Swift/SendableMetatype)

[`NSCopying`](/documentation/Foundation/NSCopying)

[`CVarArg`](/documentation/Swift/CVarArg)

[`NSObjectProtocol`](/documentation/ObjectiveC/NSObjectProtocol)

[`NSSecureCoding`](/documentation/Foundation/NSSecureCoding)

### Inherits From

[`NSObject-swift.class`](/documentation/ObjectiveC/NSObject-swift.class)

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)