Class

UNNotificationTrigger

The common behavior for subclasses that trigger the delivery of a local or remote notification.

Declaration

class UNNotificationTrigger : NSObject

Overview

The UNNotificationTrigger class is an abstract class for representing an event that triggers the delivery of a notification. You don't create instances of this class directly. Instead, you instantiate the concrete subclass that defines the trigger condition you want for your notification. You then assign the resulting object to the UNNotificationRequest object that you use to schedule your notification.

Concrete trigger classes include the following:

Topics

Configuring the Trigger’s Behavior

var repeats: Bool

A Boolean value indicating whether the system reschedules the notification after it is delivered.

Relationships

Inherits From

See Also

Triggers

class UNCalendarNotificationTrigger

A trigger condition that causes a notification to be delivered at a specific date and time.

class UNTimeIntervalNotificationTrigger

A trigger condition that causes a notification to be delivered after the specified amount of time elapses.

class UNLocationNotificationTrigger

A trigger condition that causes a notification to be delivered when the user's device enters or exits the specified geographic region.

class UNPushNotificationTrigger

A trigger condition that indicates the notification was sent from Apple Push Notification Service (APNs).