Instance Property


The relative priority at which you’d like a host to handle the task, specified as a floating point value between 0.0 (lowest priority) and 1.0 (highest priority).


@property float priority;


To provide hints to a host on how to prioritize URL session tasks from your app, specify a priority for each task. Specifying a priority provides only a hint and does not guarantee performance. If you don’t specify a priority, a URL session task has a priority of NSURLSessionTaskPriorityDefault, with a value of 0.5.

There are three named priorities you can employ, described in URL Session Task Priority.

You can specify or change a task’s priority at any time, but not all networking protocols respond to changes after a task has started. There is no API to let you determine the effective priority for a task from a host’s perspective.

See Also

Controlling the Task State

- cancel

Cancels the task.

- resume

Resumes the task, if it is suspended.

- suspend

Temporarily suspends a task.


The current state of the task—active, suspended, in the process of being canceled, or completed.


Constants for determining the current state of a task.

URL Session Task Priority

Constants for providing task priority hints to a host, used with the priority property.