The HKDocumentType class is a concrete subclass of the HKSampleType class. Use document type objects when creating queries for documents.


To create a document type instance, use the HKObjectType class’s documentType(forIdentifier:) convenience method.

Subclassing Notes

Like many HealthKit classes, document types are not extensible and should not be subclassed.

Additionally, this class reuses the same instance whenever possible. Letting multiple queries share the same document type helps reduce the overall memory usage.


Inherits From

Conforms To

See Also

Medical Records

class HKCDADocumentSample

A Clinical Document Architecture (CDA) sample that stores a single document.

class HKDocumentSample

The HKDocumentSample class is an abstract class that represents a health document in the HealthKit store.

static let CDA: HKDocumentTypeIdentifier

The CDA Document type identifier. Use this type identifier when requesting permission to read or share CDA documents.