<!--
{
  "availability" : [
    "iOS: 8.0.0 - 27.0.0",
    "iPadOS: 8.0.0 - 27.0.0",
    "macCatalyst: 13.1.0 - 27.0.0",
    "macOS: 13.0.0 -",
    "visionOS: 1.0.0 - 27.0.0",
    "watchOS: 2.0.0 - 27.0.0"
  ],
  "documentType" : "symbol",
  "framework" : "HealthKit",
  "identifier" : "/documentation/HealthKit/HKObjectType/correlationType(forIdentifier:)",
  "metadataVersion" : "0.1.0",
  "role" : "Type Method",
  "symbol" : {
    "kind" : "Type Method",
    "modules" : [
      "HealthKit"
    ],
    "preciseIdentifier" : "c:objc(cs)HKObjectType(cm)correlationTypeForIdentifier:"
  },
  "title" : "correlationType(forIdentifier:)"
}
-->

# correlationType(forIdentifier:)

Returns the shared correlation type for the provided identifier.

```
class func correlationType(forIdentifier identifier: HKCorrelationTypeIdentifier) -> HKCorrelationType?
```

## Parameters

`identifier`

A correlation type identifier. For a list of valid identifiers, see [`HKCorrelationTypeIdentifier`](/documentation/HealthKit/HKCorrelationTypeIdentifier).

## Return Value

The shared [`HKCorrelationType`](/documentation/HealthKit/HKCorrelationType) instance based on the provided identifier.

## Discussion

This method returns an instance of the [`HKCorrelationType`](/documentation/HealthKit/HKCorrelationType) concrete subclass. HealthKit uses correlation types to create complex data objects that contain multiple values. Use correlation type instances to create correlation objects that you can save in the HealthKit store. For more information, see [`HKCorrelation`](/documentation/HealthKit/HKCorrelation).

---

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)