Class

HKSampleType

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

Declaration

@interface HKSampleType : HKObjectType

Overview

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

Topics

Checking the Duration Restriction

maximumAllowedDuration

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

Beta

Relationships

Inherits From

See Also

Type Objects

HKCharacteristicType

A type that represents data that does not typically change over time.

HKQuantityType

A type that identifies samples that store numerical values.

HKCategoryType

A type that identifies samples that contain a value from a small set of possible values.

HKCorrelationType

A type that identifies samples that group multiple subsamples.

HKActivitySummaryType

A type that identifies activity summary objects.

HKAudiogramSampleType

A type that identifies samples that contain audiogram data.

Beta
HKSeriesType

A type that indicates the data stored in a series sample.

HKObjectType

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

HKClinicalType

A type that identifies samples that contain clinical record data.

HKWorkoutType

A type that identifies samples that store information about a workout.

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software