Initializes a new source revision object with the provided source and version information.
- iOS 9.0+
- Mac Catalyst 13.0+
- watchOS 2.0+
The source for a sample.
A string that uniquely identifies the source’s version.
A newly initialized source revision object.
Use this method to create source revisions for use in queries. For more information, see
On iOS 9.0 or later, the system automatically creates a source revision for any samples saved to the HealthKit store. For earlier versions of iOS, the system only saves
HKSource information. However, when these samples are retrieved on iOS 9.0 or later, the system creates a new source revision object for the sample. HealthKit uses the previously stored source information with a
nil-valued version string.