---
title: nsPredicate
framework: healthkit
role: symbol
role_heading: Instance Property
path: healthkit/hksamplepredicate/nspredicate
---

# nsPredicate

An optional predicate that further restricts the results that the query returns.

## Declaration

```swift
nonisolated(unsafe) let nsPredicate: NSPredicate?
```

## See Also

### Accessing Sample Predicate Data

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