<!--
{
  "availability" : [
    "iOS: 8.0.0 -",
    "iPadOS: 8.0.0 -",
    "macCatalyst: 13.0.0 -",
    "macOS: 13.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 2.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "HealthKit",
  "identifier" : "/documentation/HealthKit/HKCorrelationType",
  "metadataVersion" : "0.1.0",
  "role" : "Class",
  "symbol" : {
    "kind" : "Class",
    "modules" : [
      "HealthKit"
    ],
    "preciseIdentifier" : "c:objc(cs)HKCorrelationType"
  },
  "title" : "HKCorrelationType"
}
-->

# HKCorrelationType

A type that identifies samples that group multiple subsamples.

```
class HKCorrelationType
```

## Overview

The [`HKCorrelationType`](/documentation/HealthKit/HKCorrelationType) class is a concrete subclass of the [`HKObjectType`](/documentation/HealthKit/HKObjectType) class. To create a correlation type instance, use the object type’s [`correlationType(forIdentifier:)`](/documentation/HealthKit/HKObjectType/correlationType(forIdentifier:)) conveniance method.

Use correlation types to:

- Request permission to read or write matching quantity samples.
- Create and share matching quantity samples.
- Query for matching quantity samples.

HealthKit provides two correlation types: blood pressure and food.

### Using Correlation Types

As with many HealthKit classes, don’t subclass correlation types.

This class reuses the same instance whenever possible. Letting multiple queries share the same workout type helps reduce the overall memory usage.

## Topics

### Creating Correlation Types

[`init(_:)`](/documentation/HealthKit/HKCorrelationType/init(_:))

Creates a correlation type using the provided identifier.

## See Also

[`HKCorrelationTypeIdentifier`](/documentation/HealthKit/HKCorrelationTypeIdentifier)

The identifiers that create correlation type objects.

[`HKCorrelation`](/documentation/HealthKit/HKCorrelation)

A sample that groups multiple related samples into a single entry.

## Relationships

### Conforms To

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

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

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

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

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

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

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

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

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

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

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

### Inherits From

[`HKSampleType`](/documentation/HealthKit/HKSampleType)

---

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)