---
title: referenceSex
framework: HealthKit
role: symbol
role_heading: Instance Property
platforms: [iOS 27.3+, iPadOS 27.3+, Mac Catalyst 27.3+, macOS 27.3+, visionOS 27.3+, watchOS 27.3+]
path: healthkit/hkhealthstore/referencesex
---

# referenceSex

The sex whose reference ranges should be used when classifying a clinical measurement for this user.

## Declaration

```swift
var referenceSex: HKReferenceSex { get throws }
```

## Discussion

Discussion .notSet when the user has not provided a value. Throws if read authorization was not granted or the value could not be read.
