Instance Method

addEvent(_:completionHandler:)

Adds a new event to the event trigger.

Declaration

func addEvent(_ event: HMEvent, completionHandler completion: @escaping (Error?) -> Void)

Parameters

event

An event to add to the event trigger.

completion

A block that executes after processing the request.

The block takes the following parameter:

error

If the request was successful, the value of error is nil; otherwise, the value provides more information about the request status.

See Also

Deprecated Symbols

func removeEvent(HMEvent, completionHandler: (Error?) -> Void)

Removes the specified event from the event trigger.

Deprecated
class func predicateForEvaluatingTrigger(occurringBefore: String, applyingOffset: DateComponents?) -> NSPredicate

Creates a predicate that evaluates whether the event occurred before a significant event.

Deprecated
class func predicateForEvaluatingTrigger(occurringAfter: String, applyingOffset: DateComponents?) -> NSPredicate

Creates a predicate that evaluates whether the event occurred before a significant event.

Deprecated