<!--
{
  "availability" : [
    "iOS: 11.0.0 -",
    "iPadOS: 11.0.0 -",
    "macCatalyst: 13.0.0 -",
    "macOS: 13.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 4.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "HealthKit",
  "identifier" : "/documentation/HealthKit/HKHeartRateMotionContext",
  "metadataVersion" : "0.1.0",
  "role" : "Enumeration",
  "symbol" : {
    "kind" : "Enumeration",
    "modules" : [
      "HealthKit"
    ],
    "preciseIdentifier" : "c:@E@HKHeartRateMotionContext"
  },
  "title" : "HKHeartRateMotionContext"
}
-->

# HKHeartRateMotionContext

Values that indicate the user’s level of activity when the heart rate sample was measured.

```
enum HKHeartRateMotionContext
```

## Topics

### Motion Contextes

[`case active`](/documentation/HealthKit/HKHeartRateMotionContext/active)

A value indicating that the user was in motion during the heart rate sample.

[`case notSet`](/documentation/HealthKit/HKHeartRateMotionContext/notSet)

A value indicating that the user’s activity level could not be determined.

[`case sedentary`](/documentation/HealthKit/HKHeartRateMotionContext/sedentary)

A value indicating that the user has been still for at least 5 minutes prior to the heart rate sample.

### Initializers

[`init?(rawValue: Int)`](/documentation/HealthKit/HKHeartRateMotionContext/init(rawValue:))

## See Also

[`static let heartRate: HKQuantityTypeIdentifier`](/documentation/HealthKit/HKQuantityTypeIdentifier/heartRate)

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

## Relationships

### Conforms To

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

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

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

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

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

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

---

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)