<!--
{
  "availability" : [
    "iOS: 9.0.0 -",
    "iPadOS: 9.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.11.0 -",
    "tvOS: 9.0.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "GameplayKit",
  "identifier" : "/documentation/GameplayKit/GKNSPredicateRule/evaluatePredicate(in:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "GameplayKit"
    ],
    "preciseIdentifier" : "c:objc(cs)GKNSPredicateRule(im)evaluatePredicateWithSystem:"
  },
  "title" : "evaluatePredicate(in:)"
}
-->

# evaluatePredicate(in:)

Returns a Boolean value indicating whether the rule’s predicate has been satisfied in the context of the specified rule system.

```
func evaluatePredicate(in system: GKRuleSystem) -> Bool
```

## Return Value

<doc://com.apple.documentation/documentation/Swift/true> if the rule is satisfied (and its action should be executed); otherwise, <doc://com.apple.documentation/documentation/Swift/false>.

## Discussion

The [`GKNSPredicateRule`](/documentation/GameplayKit/GKNSPredicateRule) class overrides this method to use its [`predicate`](/documentation/GameplayKit/GKNSPredicateRule/predicate) property for testing the rule. Subclasses of [`GKNSPredicateRule`](/documentation/GameplayKit/GKNSPredicateRule) do not need to override this method.

---

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)