---
title: predicate
framework: healthkit
role: symbol
role_heading: Instance Property
path: healthkit/hkquery/predicate
---

# predicate

A predicate used to filter the objects returned from the HealthKit store.

## Declaration

```swift
var predicate: NSPredicate? { get }
```

## Discussion

Discussion If the predicate is nil, the query does not filter its results. Instead, it returns all the objects matching the query’s other parameters.

## See Also

### Accessing properties

- [objectType](healthkit/hkquery/objecttype.md)
- [sampleType](healthkit/hkquery/sampletype.md)
