<!--
{
  "availability" : [
    "iOS: 8.0.0 -",
    "iPadOS: 8.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.10.0 -",
    "tvOS: -",
    "visionOS: 1.0.0 -",
    "watchOS: 3.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "CloudKit",
  "identifier" : "/documentation/CloudKit/CKQuery/predicate",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "CloudKit"
    ],
    "preciseIdentifier" : "c:objc(cs)CKQuery(py)predicate"
  },
  "title" : "predicate"
}
-->

# predicate

The predicate to use for matching records.

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

## Discussion

A predicate contains one or more expressions that evaluate to <doc://com.apple.documentation/documentation/Swift/true> or <doc://com.apple.documentation/documentation/Swift/false>. Expressions are often value-based comparisons, but predicates support other types of operators, including string comparisons and aggregate operations. For guidelines on how to construct predicates for your queries, see [`Predicate Rules for Query Objects`](/documentation/CloudKit/CKQuery#Predicate-Rules-for-Query-Objects).

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)