---
title: biologicalSex()
framework: healthkit
role: symbol
role_heading: Instance Method
path: healthkit/hkhealthstore/biologicalsex()
---

# biologicalSex()

Reads someone’s biological sex from the HealthKit store.

## Declaration

```swift
func biologicalSex() throws -> HKBiologicalSexObject
```

## Mentioned in

About the HealthKit framework

## Return Value

Return Value An object containing information about someone’s biological sex.

## Discussion

Discussion For a list of possible values, see HKBiologicalSex. If a person hasn’t set their biological sex or if they’ve denied permission to read the biological sex, this method returns an HKBiologicalSex.notSet value. note: In Swift, this method returns a nonoptional result and is marked with the throws keyword to indicate that it throws an error in cases of failure. You call this method in a try expression and handle any errors in the catch clauses of a do statement, as described in Error Handling in The Swift Programming Language and About Imported Cocoa Error Parameters.

## Topics

### Possible Values

- [HKBiologicalSexObject](healthkit/hkbiologicalsexobject.md)
- [HKBiologicalSex](healthkit/hkbiologicalsex.md)

## See Also

### Reading characteristic data

- [bloodType()](healthkit/hkhealthstore/bloodtype().md)
- [dateOfBirth()](healthkit/hkhealthstore/dateofbirth().md)
- [dateOfBirthComponents()](healthkit/hkhealthstore/dateofbirthcomponents().md)
- [fitzpatrickSkinType()](healthkit/hkhealthstore/fitzpatrickskintype().md)
- [wheelchairUse()](healthkit/hkhealthstore/wheelchairuse().md)
