Returns the shared correlation type for the provided identifier.
SDKs
- iOS 8.0+
- Mac Catalyst 13.0+
- watchOS 2.0+
Framework
- Health
Kit
Declaration
+ (HKCorrelation Type *)correlationTypeForIdentifier:(HKCorrelation Type Identifier)identifier;
Parameters
identifier
A correlation type identifier. For a list of valid identifiers, see
HKCorrelation
.Type Identifier
Return Value
The shared HKCorrelation
instance based on the provided identifier.
Discussion
This method returns an instance of the HKCorrelation
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
.