HKDocument class is an abstract class that represents a health document in the HealthKit store.
- iOS 10.0+
- watchOS 3.0+
You should never instantiate an
HKDocument object directly. Instead, you always work with a concrete subclass. In iOS 10 and watchOS 3, the only concrete class is the
Document samples are immutable: You set the sample’s properties when you create it, and they cannot change.
Like many HealthKit classes, you should not create any custom subclasses of the
HKDocument class. You can extend the
HKDocument class and its subclasses by adding custom metadata keys and values to the metadata dictionary when the object is instantiated.