Instance Method


Evaluates an expression using a given object and context.


func expressionValue(with object: Any?, context: NSMutableDictionary?) -> Any?



The object against which the expression is evaluated.


A dictionary that the expression can use to store temporary state for one predicate evaluation. Can be nil.

Note that context is mutable, and that it can only be accessed during the evaluation of the expression. You must not attempt to retain it for use elsewhere.

Return Value

The evaluated object.

See Also

Evaluating an Expression

func allowEvaluation()

Force an expression that was securely decoded to allow evaluation.

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software