The type of objects being queried.
Deprecated
Use object
instead.
SDKs
- iOS 8.0–9.3Deprecated
- Mac Catalyst 13.0–13.0Deprecated
- watchOS 2.0–2.2Deprecated
Framework
- Health
Kit
Declaration
var sampleType: HKSample Type? { get }
Discussion
Not all queries return objects of the specified type; however, they all use the object type to generate their results. For example, source queries return a set of data sources that have saved objects with a matching type, while statistics queries return statistical information about the objects with a matching type.