Instance Method

getPendingTaskRequests(completionHandler:)

Request a list of unexecuted scheduled task requests.

Declaration

func getPendingTaskRequests(completionHandler: @escaping ([BGTaskRequest]) -> Void)

Parameters

completionHandler

The completion handler called with the pending tasks. The handler may execute on a background thread.

The handler takes a single parameter tasksRequests, an array of BGTaskRequest objects. The array is empty if there are no scheduled tasks.

The objects passed in the array are copies of the existing requests. Changing the attributes of a request has no effect. To change the attributes submit a new task request using submit(_:).