submit(_:)
Submit a previously registered background task for execution.
Declaration
func submit(_ taskRequest: BGTaskRequest) throwsParameters
- taskRequest:
A background task request object specifying the task identifier and optional configuration information.
Mentioned in
Discussion
Submitting a task request for an unexecuted task that’s already in the queue replaces the previous task request.
There can be a total of 1 refresh task and 10 processing tasks scheduled at any time. Trying to schedule more tasks returns BGTaskScheduler.Error.Code.tooManyPendingTaskRequests.