Contents

predicateForEvaluatingTrigger(_:relatedBy:toValue:)

Creates a predicate that evaluates whether a characteristic value relates to the specified value.

Declaration

class func predicateForEvaluatingTrigger(_ characteristic: HMCharacteristic, relatedBy operatorType: NSComparisonPredicate.Operator, toValue value: Any) -> NSPredicate

Parameters

  • characteristic:

    The characteristic that is part of the predicate.

  • operatorType:

    The relationship between the characteristic and the target value. Valid values can be Less Than, Greater Than, Less Than or Equal, Greater Than or Equal, Equal, or Not Equal. All other values cause an exception to be thrown.

  • value:

    The value of the characteristic to compare when evaluating the predicate.

Return Value

A predicate object that represents a condition to evaluate before executing the scene.

See Also

Creating predicates