One Logo Pool Ball
HomeKit · IOS API REFERENCE

HMEventTrigger

class · iOS 9.0+ · SDK 27.1

class HMEventTrigger

Members (26)

static

predicateForEvaluatingTrigger

TypeScript
static predicateForEvaluatingTriggerOccurringAfter(dateComponents: _Foundation_DateComponents): _Foundation_NSPredicate
Swift declaration
class func predicateForEvaluatingTrigger(occurringAfter dateComponents: DateComponents) -> NSPredicate
static · iOS 11.0+

predicateForEvaluatingTriggerOccurring

TypeScript
static predicateForEvaluatingTriggerOccurringAfterSignificantEvent(significantEvent: HMSignificantTimeEvent): _Foundation_NSPredicate
Swift declaration
class func predicateForEvaluatingTriggerOccurring(afterSignificantEvent significantEvent: HMSignificantTimeEvent) -> NSPredicate
static · iOS 9.0+ · Deprecated in iOS 11.0

predicateForEvaluatingTrigger

TypeScript
static predicateForEvaluatingTriggerOccurringAfterApplyingOffset(significantEvent: string, offset?: (_Foundation_DateComponents) | null): _Foundation_NSPredicate
Swift declaration
class func predicateForEvaluatingTrigger(occurringAfter significantEvent: String, applyingOffset offset: DateComponents?) -> NSPredicate
static

predicateForEvaluatingTrigger

TypeScript
static predicateForEvaluatingTriggerOccurringBefore(dateComponents: _Foundation_DateComponents): _Foundation_NSPredicate
Swift declaration
class func predicateForEvaluatingTrigger(occurringBefore dateComponents: DateComponents) -> NSPredicate
static · iOS 11.0+

predicateForEvaluatingTriggerOccurring

TypeScript
static predicateForEvaluatingTriggerOccurringBeforeSignificantEvent(significantEvent: HMSignificantTimeEvent): _Foundation_NSPredicate
Swift declaration
class func predicateForEvaluatingTriggerOccurring(beforeSignificantEvent significantEvent: HMSignificantTimeEvent) -> NSPredicate
static · iOS 9.0+ · Deprecated in iOS 11.0

predicateForEvaluatingTrigger

TypeScript
static predicateForEvaluatingTriggerOccurringBeforeApplyingOffset(significantEvent: string, offset?: (_Foundation_DateComponents) | null): _Foundation_NSPredicate
Swift declaration
class func predicateForEvaluatingTrigger(occurringBefore significantEvent: String, applyingOffset offset: DateComponents?) -> NSPredicate
static · iOS 11.0+

predicateForEvaluatingTriggerOccurringBetweenDate

TypeScript
static predicateForEvaluatingTriggerOccurringBetweenDate(firstDateComponents: _Foundation_DateComponents, secondDateWithComponents: _Foundation_DateComponents): _Foundation_NSPredicate
Swift declaration
class func predicateForEvaluatingTriggerOccurringBetweenDate(with firstDateComponents: DateComponents, secondDateWith secondDateWithComponents: DateComponents) -> NSPredicate
static · iOS 11.0+

predicate

TypeScript
static predicateForEvaluatingTriggerOccurringBetweenSignificantEventSecondSignificantEvent(firstSignificantEvent: HMSignificantTimeEvent, secondSignificantEvent: HMSignificantTimeEvent): _Foundation_NSPredicate
Swift declaration
class func predicate(forEvaluatingTriggerOccurringBetweenSignificantEvent firstSignificantEvent: HMSignificantTimeEvent, secondSignificantEvent: HMSignificantTimeEvent) -> NSPredicate
static

predicateForEvaluatingTrigger

TypeScript
static predicateForEvaluatingTriggerOccurringOn(dateComponents: _Foundation_DateComponents): _Foundation_NSPredicate
Swift declaration
class func predicateForEvaluatingTrigger(occurringOn dateComponents: DateComponents) -> NSPredicate
static

predicateForEvaluatingTrigger

TypeScript
static predicateForEvaluatingTriggerRelatedByToValue(characteristic: HMCharacteristic, operatorType: _Foundation_NSComparisonPredicate_Operator, value: unknown): _Foundation_NSPredicate
Swift declaration
class func predicateForEvaluatingTrigger(_ characteristic: HMCharacteristic, relatedBy operatorType: NSComparisonPredicate.Operator, toValue value: Any) -> NSPredicate
static · iOS 11.0+

predicateForEvaluatingTrigger

TypeScript
static predicateForEvaluatingTriggerWithPresence(presenceEvent: HMPresenceEvent): _Foundation_NSPredicate
Swift declaration
class func predicateForEvaluatingTrigger(withPresence presenceEvent: HMPresenceEvent) -> NSPredicate
method · iOS 9.0+ · Deprecated in iOS 11.0

addEvent

TypeScript
addEvent(event: HMEvent, completion: ((arg0: (NativeError) | null) => void)): void
Swift declaration
func addEvent(_ event: HMEvent, completionHandler completion: @escaping @Sendable ((any Error)?) -> Void)
init · iOS 11.0+

init

TypeScript
static initNameEventsEndRecurrencesPredicate(name: string, events: Array<HMEvent>, endEvents?: (Array<HMEvent>) | null, recurrences?: (Array<_Foundation_DateComponents>) | null, predicate?: (_Foundation_NSPredicate) | null): HMEventTrigger
Swift declaration
init(name: String, events: [HMEvent], end endEvents: [HMEvent]?, recurrences: [DateComponents]?, predicate: NSPredicate?)
init · iOS 9.0+

init

TypeScript
static initNameEventsPredicate(name: string, events: Array<HMEvent>, predicate?: (_Foundation_NSPredicate) | null): HMEventTrigger
Swift declaration
init(name: String, events: [HMEvent], predicate: NSPredicate?)
method · iOS 9.0+ · Deprecated in iOS 11.0

removeEvent

TypeScript
removeEvent(event: HMEvent, completion: ((arg0: (NativeError) | null) => void)): void
Swift declaration
func removeEvent(_ event: HMEvent, completionHandler completion: @escaping @Sendable ((any Error)?) -> Void)
method · iOS 11.0+

updateEndEvents

TypeScript
updateEndEvents(endEvents: Array<HMEvent>, completion: ((arg0: (NativeError) | null) => void)): void
Swift declaration
func updateEndEvents(_ endEvents: [HMEvent]) async throws
method · iOS 11.0+

updateEvents

TypeScript
updateEvents(events: Array<HMEvent>, completion: ((arg0: (NativeError) | null) => void)): void
Swift declaration
func updateEvents(_ events: [HMEvent]) async throws
method · iOS 11.0+

updateExecuteOnce

TypeScript
updateExecuteOnce(executeOnce: boolean, completion: ((arg0: (NativeError) | null) => void)): void
Swift declaration
func updateExecuteOnce(_ executeOnce: Bool) async throws
method · iOS 9.0+

updatePredicate

TypeScript
updatePredicate(predicate: (_Foundation_NSPredicate) | null, completion: ((arg0: (NativeError) | null) => void)): void
Swift declaration
func updatePredicate(_ predicate: NSPredicate?) async throws
method · iOS 11.0+

updateRecurrences

TypeScript
updateRecurrences(recurrences: (Array<_Foundation_DateComponents>) | null, completion: ((arg0: (NativeError) | null) => void)): void
Swift declaration
func updateRecurrences(_ recurrences: [DateComponents]?) async throws
get · iOS 11.0+

endEvents

TypeScript
get endEvents(): Array<HMEvent>
Swift declaration
var endEvents: [HMEvent] { get }
get · iOS 9.0+

events

TypeScript
get events(): Array<HMEvent>
Swift declaration
var events: [HMEvent] { get }
get · iOS 11.0+

executeOnce

TypeScript
get executeOnce(): boolean
Swift declaration
var executeOnce: Bool { get }
get · iOS 9.0+

predicate

TypeScript
get predicate(): (_Foundation_NSPredicate) | null
Swift declaration
@NSCopying var predicate: NSPredicate? { get }
get · iOS 11.0+

recurrences

TypeScript
get recurrences(): (Array<_Foundation_DateComponents>) | null
Swift declaration
var recurrences: [DateComponents]? { get }
get · iOS 11.0+

triggerActivationState

TypeScript
get triggerActivationState(): HMEventTriggerActivationState
Swift declaration
var triggerActivationState: HMEventTriggerActivationState { get }

Skipped declarations

1 declarations were excluded from these bindings. Each reason comes from the generator or the iOS SDK compiler.

HMEventTrigger.init()

inherited init: cannot prove legal (class declares 3 custom initializers)

All HomeKit types →