Instance Property


An app-provided string value for the current task.


var taskDescription: String? { get set }


The system doesn’t interpret this value; use it for whatever purpose you see fit. For example, you could store a description of the task for debugging purposes, or a key to track the task in your own data structures.

See Also

Obtaining General Task Information

var currentRequest: URLRequest?

The URL request object currently being handled by the task.

var originalRequest: URLRequest?

The original request object passed when the task was created.

var response: URLResponse?

The server’s response to the currently active request.

var taskIdentifier: Int

An identifier uniquely identifying the task within a given session.

var error: Error?

An error object that indicates why the task failed.