Creates a rule whose predicate is evaluated and action is executed through the specified blocks.
- iOS 9.0+
- macOS 10.11+
- Mac Catalyst 13.0+
- tvOS 9.0+
A block that GameplayKit calls to evaluate the rule. The block takes a single parameter:
The rule system in whose context the rule is being evaluated.
The block returns a Boolean value—
trueif the predicate is satisfied (and the rule’s action should execute);
A block to be invoked after the rule’s predicate is satisfied. The block takes a single parameter:
The rule system in whose context the rule is executing its action.
A new rule object.