Instance Method

getPendingNotificationRequests(completionHandler:)

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

Declaration

func getPendingNotificationRequests(completionHandler: @escaping ([UNNotificationRequest]) -> Void)

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

func removePendingNotificationRequests(withIdentifiers: [String])

Unschedules the specified notification requests.

func removeAllPendingNotificationRequests()

Unschedules all pending notification requests.