Enumeration

NSURLErrorNetworkUnavailableReason

An enumeration of reasons why a task couldn’t satisfy networking constraints.

Declaration

typedef enum NSURLErrorNetworkUnavailableReason : NSInteger {
    ...
} NSURLErrorNetworkUnavailableReason;

Overview

The network may be unavailable due to restrictions placed on the NSURLSessionConfiguration, such as allowsConstrainedNetworkAccess, allowsExpensiveNetworkAccess and allowsCellularAccess.

Topics

Unavailability Reasons

NSURLErrorNetworkUnavailableReasonCellular

A reason that indicates network is unavailable because the interface is cellular and cellular network is disabled.

NSURLErrorNetworkUnavailableReasonConstrained

A reason that indicates network is unavailable because the user enabled “Low Data Mode” in the Settings app.

NSURLErrorNetworkUnavailableReasonExpensive

A reason that indicates network is unavailable because the system marked the interface as expensive.

See Also

Keys

NSURLErrorFailingURLErrorKey

The URL which caused a load to fail.

NSURLErrorFailingURLPeerTrustErrorKey

The state of a failed SSL handshake.

NSURLErrorFailingURLStringErrorKey

The URL which caused a load to fail.

NSURLErrorBackgroundTaskCancelledReasonKey

A key in the error dictionary that provides the reason for canceling a background task.

URL Session Background Task Cancellation Reasons

Reasons that indicate why the system canceled a background task.

NSURLErrorNetworkUnavailableReasonKey

The reason the network was unavailable for a task.