---
title: version
framework: healthkit
role: symbol
role_heading: Instance Property
path: healthkit/hksourcerevision/version
---

# version

A string that identifies a particular version of the source.

## Declaration

```swift
var version: String? { get }
```

## Discussion

Discussion This property contains a string that identifies the version of the app or device used to save the sample. If the sample is saved by an app, the property contains the current version number of the app (for example, 1.4). If it is saved by an iOS device or an Apple Watch, the property contains the current version number of the device’s OS (for example, 9.0 or 2.0 respectively). If it is saved directly by a Bluetooth device, this property contains the version string provided by that device. note: For samples saved prior to iOS 9.0 or watchOS 2.0, the version is set to nil.

## Topics

### Constants

- [HKSourceRevisionAnyVersion](healthkit/hksourcerevisionanyversion.md)

## See Also

### Accessing Source and Version Information

- [source](healthkit/hksourcerevision/source.md)
- [operatingSystemVersion](healthkit/hksourcerevision/operatingsystemversion.md)
- [productType](healthkit/hksourcerevision/producttype.md)
