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

# operatingSystemVersion

A string that identifies the operating system used to save a sample.

## Declaration

```swift
var operatingSystemVersion: OperatingSystemVersion { get }
```

## Discussion

Discussion For samples saved on watchOS 4.0, HealthKit sets the operating system property to {4, 0, 0}. note: For samples saved using older versions of HealthKit, the system approximates the operating system. For instance, HealthKit marks samples saved after iOS 8.0 but before 8.2 as {8, 0, 0}. HealthKit marks samples saved after 8.2 but before 9.0  as {8, 2, 0}.

## Topics

### Constants

- [HKSourceRevisionAnyOperatingSystem](healthkit/hksourcerevisionanyoperatingsystem.md)

## See Also

### Accessing Source and Version Information

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