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

# predicate

The predicate that filters samples matching this descriptor.

## Declaration

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

## Discussion

Discussion If the predicate is nil, the descriptor matches all samples of the data type specified by the sampleType property.

## See Also

### Accessing Descriptor Data

- [sampleType](healthkit/hkquerydescriptor/sampletype.md)
