Instance Method


Schedules a local notification for delivery.


- (void)addNotificationRequest:(UNNotificationRequest *)request withCompletionHandler:(void (^)(NSError *error))completionHandler;



The request object containing the notification payload and trigger information. This parameter must not be nil.


The block to execute with the results. This block may be executed on a background thread. The block has no return value and takes the following parameter:


An error object indicating whether a problem occurred. If the notification was scheduled successfully, this parameter is nil; otherwise, it is set to an error object indicating the reason for the failure.


This method schedules local notifications only; you cannot use it to schedule the delivery of remote notifications. Upon calling this method, the system begins tracking the trigger conditions associated with your request. When the trigger condition is met, the system delivers your notification. If the request does not contain a UNNotificationTrigger object, the notification is delivered right away.

You may call this method from any thread of your app.

See Also

Scheduling and Canceling Notification Requests

- getPendingNotificationRequestsWithCompletionHandler:

Returns a list of all notification requests that are scheduled and waiting to be delivered.

- removePendingNotificationRequestsWithIdentifiers:

Unschedules the specified notification requests.

- removeAllPendingNotificationRequests

Unschedules all pending notification requests.