<!--
{
  "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/HKObjectType",
  "metadataVersion" : "0.1.0",
  "role" : "Class",
  "symbol" : {
    "kind" : "Class",
    "modules" : [
      "HealthKit"
    ],
    "preciseIdentifier" : "c:objc(cs)HKObjectType"
  },
  "title" : "HKObjectType"
}
-->

# HKObjectType

An abstract superclass with subclasses that identify a specific type of data for the HealthKit store.

```
class HKObjectType
```

## Overview

The `HKObjectType` class is an abstract class. Don’t instantiate an `HKObjectType` object directly. Instead, instantiate one of the following concrete subclasses:

- [`HKActivitySummaryType`](/documentation/HealthKit/HKActivitySummaryType)
- [`HKCategoryType`](/documentation/HealthKit/HKCategoryType)
- [`HKCorrelationType`](/documentation/HealthKit/HKCorrelationType)
- [`HKCharacteristicType`](/documentation/HealthKit/HKCharacteristicType)
- [`HKDocumentType`](/documentation/HealthKit/HKDocumentType)
- [`HKQuantityType`](/documentation/HealthKit/HKQuantityType)
- [`HKSeriesType`](/documentation/HealthKit/HKSeriesType)
- [`HKWorkoutType`](/documentation/HealthKit/HKWorkoutType)

The `HKObjectType` class provides a convenience method to create each of these subclasses.

### Work with Object Types

Like many HealthKit classes, HealthKit object types aren’t extensible. Don’t subclass these classes.

Additionally, wherever possible, this class uses a single instance to represent all copies of the same type. For example, if you make two calls to the [`quantityType(forIdentifier:)`](/documentation/HealthKit/HKObjectType/quantityType(forIdentifier:)) method with the same identifier, the system returns the same instance. Reusing object types helps reduce HealthKit’s overall memory usage.

## Topics

### Creating quantity types

[`+  quantityTypeForIdentifier:`](/documentation/HealthKit/HKObjectType/quantityType(forIdentifier:))

Returns the shared quantity type for the provided identifier.

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

The identifiers that create quantity type objects.

### Creating category types

[`+  categoryTypeForIdentifier:`](/documentation/HealthKit/HKObjectType/categoryType(forIdentifier:))

Returns the shared category type for the provided identifier.

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

Identifiers for creating category types.

### Creating characteristic types

[`+  characteristicTypeForIdentifier:`](/documentation/HealthKit/HKObjectType/characteristicType(forIdentifier:))

Returns the shared characteristic type for the provided identifier.

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

The identifiers that create characteristic type objects.

### Creating correlation types

[`+  correlationTypeForIdentifier:`](/documentation/HealthKit/HKObjectType/correlationType(forIdentifier:))

Returns the shared correlation type for the provided identifier.

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

The identifiers that create correlation type objects.

### Creating workout types

[`+  workoutType`](/documentation/HealthKit/HKObjectType/workoutType())

Returns the shared [`HKWorkoutType`](/documentation/HealthKit/HKWorkoutType) object.

### Creating activity summary types

[`+  activitySummaryType`](/documentation/HealthKit/HKObjectType/activitySummaryType())

Returns the shared activity summary type.

### Creating electrocardiogram types

[`+  electrocardiogramType`](/documentation/HealthKit/HKObjectType/electrocardiogramType())

Returns the shared electrocardiogram type.

### Creating audiogram sample types

[`+  audiogramSampleType`](/documentation/HealthKit/HKObjectType/audiogramSampleType())

Returns an audiogram sample type.

### Creating vision prescription types

[`+  visionPrescriptionType`](/documentation/HealthKit/HKObjectType/visionPrescriptionType())

Returns a shared vision prescription type object.

### Creating clinical record types

[`+  clinicalTypeForIdentifier:`](/documentation/HealthKit/HKObjectType/clinicalType(forIdentifier:))

Returns the shared clinical type for the provided identifier.

### Creating series types

[`+  seriesTypeForIdentifier:`](/documentation/HealthKit/HKObjectType/seriesType(forIdentifier:))

Returns the shared series type for the provided identifier.

### Creating document types

[`+  documentTypeForIdentifier:`](/documentation/HealthKit/HKObjectType/documentType(forIdentifier:))

Returns the shared document type for the provided identifier.

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

The identifiers for documents.

### Getting property data

[`identifier`](/documentation/HealthKit/HKObjectType/identifier)

A unique string identifying the HealthKit object type.

[`-  requiresPerObjectAuthorization`](/documentation/HealthKit/HKObjectType/requiresPerObjectAuthorization())

Returns a Boolean that indicates whether the data type requires per-object authorization.

## Relationships

### Inherited By

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

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

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

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

### Conforms To

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

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

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

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

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

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

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

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

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

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

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

### 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)