---
title: sampleType
framework: healthkit
role: symbol
role_heading: Instance Property
path: healthkit/hksample/sampletype
---

# sampleType

The sample type.

## Declaration

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

## Discussion

Discussion This property contains a concrete sample type that corresponds with this sample’s concrete class. For example, if the sample is an HKQuantitySample instance, it returns an HKQuantityType object.

## See Also

### Related Documentation

- [quantityType](healthkit/hkquantitysample/quantitytype.md)
- [correlationType](healthkit/hkcorrelation/correlationtype.md)
- [categoryType](healthkit/hkcategorysample/categorytype.md)

### Accessing the Sample’s Data

- [startDate](healthkit/hksample/startdate.md)
- [endDate](healthkit/hksample/enddate.md)
- [hasUndeterminedDuration](healthkit/hksample/hasundeterminedduration.md)
