An object indicating the source of a HealthKit sample.
- iOS 9.0+
- Mac Catalyst 13.0+
- watchOS 2.0+
HKSource class acts as a wrapper for the
HKSource class, adding information about the source's version, operating system, and product type.
Source revision objects are immutable: you set the source revision’s properties when you create the object, and they cannot change.
HKObject instance is created, its
source property is set to
nil. When the object is saved to the HealthKit store, HealthKit assigns a new source revision to the object’s
source property. The source revision can be accessed only on objects retrieved from the HealthKit store.
Subclassing Source Revisions
Like many HealthKit classes, the
HKSource class is not extensible and should not be subclassed.