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

# sampleType

The sample type.

```
@NSCopying var sampleType: HKSampleType { get }
```

## Discussion

This property contains a concrete sample type that corresponds with this sample’s concrete class. For example, if the sample is an [`HKQuantitySample`](/documentation/HealthKit/HKQuantitySample) instance, it returns an [`HKQuantityType`](/documentation/HealthKit/HKQuantityType) object.

## See Also

[`quantityType`](/documentation/HealthKit/HKQuantitySample/quantityType)

The quantity type for this sample.

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

The type for this correlation.

[`categoryType`](/documentation/HealthKit/HKCategorySample/categoryType)

The category type for this sample.



---

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)