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

# HKSampleType

An abstract superclass for all classes that identify a specific type of sample when working with the HealthKit store.

```
class HKSampleType
```

## Overview

The [`HKSampleType`](/documentation/HealthKit/HKSampleType) class is an abstract subclass of the [`HKObjectType`](/documentation/HealthKit/HKObjectType) class, used to represent data samples. Never instantiate an [`HKSampleType`](/documentation/HealthKit/HKSampleType) object directly. Instead, work with one of its concrete subclasses: [`HKCategoryType`](/documentation/HealthKit/HKCategoryType), [`HKCorrelationType`](/documentation/HealthKit/HKCorrelationType), [`HKQuantityType`](/documentation/HealthKit/HKQuantityType), or [`HKWorkoutType`](/documentation/HealthKit/HKWorkoutType) classes.

## Topics

### Checking the Duration Restriction

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

A Boolean value that indicates whether samples of this type have a minimum time interval between the start and end dates.

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

The minimum duration if the sample type has a restricted duration.

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

A Boolean value that indicates whether samples of this type have a maximum time interval between the start and end dates.

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

The maximum duration if the sample type has a restricted duration.

### Checking on Recalibrating Estimates

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

A Boolean value that indicates whether HealthKit supports recalibrating the prediction algorithm used to produce estimates for this sample type.



---

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)