init(source:version:productType:operatingSystemVersion:)
Initializes a new source revision object with the provided source, version, product type, and operating system.
Declaration
init(source: HKSource, version: String?, productType: String?, operatingSystemVersion: OperatingSystemVersion)Parameters
- source:
The source for a sample.
- version:
A string that uniquely identifies the source’s version.
- productType:
A string that identifies the device used to save the sample.
- operatingSystemVersion:
A string that identifies the operating system used to save the sample.
Return Value
A newly initialized source revision object.
Discussion
Use this method to create source revisions for use in queries. For more information, see HKPredicateKeyPathSourceRevision.