Instance Method

getPendingNotificationRequestsWithCompletionHandler:

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

Declaration

- (void)getPendingNotificationRequestsWithCompletionHandler:(void (^)(NSArray<UNNotificationRequest *> *requests))completionHandler;

Parameters

completionHandler

A block for processing notification requests. This block may be executed on a background thread. The block has no return value and takes a single parameter.

requests

An array of UNNotificationRequest objects representing the scheduled notification requests. If there are no scheduled requests, this array is empty.

Discussion

This method executes asynchronously, returning immediately and executing the provided block on a secondary thread when the results are available.

See Also

Scheduling and Canceling Notification Requests

- addNotificationRequest:withCompletionHandler:

Schedules a local notification for delivery.

- removePendingNotificationRequestsWithIdentifiers:

Unschedules the specified notification requests.

- removeAllPendingNotificationRequests

Unschedules all pending notification requests.