One Logo Pool Ball
Foundation · IOS API REFERENCE

URLError.Code

struct · iOS 8.0+ · SDK 27.1

struct Code

Codes that describe errors within the URL loading API.

Members (50)

get · iOS 8.0+

callIsActive

TypeScript
get callIsActive(): URLError_Code
Swift declaration
static var callIsActive: URLError.Code { get }

A connection was attempted while a phone call is active on a network that does not support simultaneous phone and data communication (EDGE or GPRS).

get · iOS 8.0+

cannotFindHost

TypeScript
get cannotFindHost(): URLError_Code
Swift declaration
static var cannotFindHost: URLError.Code { get }

The host name for a URL could not be resolved.

get · iOS 8.0+

cannotMoveFile

TypeScript
get cannotMoveFile(): URLError_Code
Swift declaration
static var cannotMoveFile: URLError.Code { get }

A download task was unable to move a downloaded file on disk.

get · iOS 8.0+

cannotOpenFile

TypeScript
get cannotOpenFile(): URLError_Code
Swift declaration
static var cannotOpenFile: URLError.Code { get }

A download task was unable to open the downloaded file on disk.

get · iOS 8.0+

dataNotAllowed

TypeScript
get dataNotAllowed(): URLError_Code
Swift declaration
static var dataNotAllowed: URLError.Code { get }

The cellular network disallowed a connection.

get · iOS 8.0+

unsupportedURL

TypeScript
get unsupportedURL(): URLError_Code
Swift declaration
static var unsupportedURL: URLError.Code { get }

A properly formed URL couldn't be handled by the framework.

get · iOS 8.0+

cannotCloseFile

TypeScript
get cannotCloseFile(): URLError_Code
Swift declaration
static var cannotCloseFile: URLError.Code { get }

A download task couldn't close the downloaded file on disk.

get · iOS 8.0+

dnsLookupFailed

TypeScript
get dnsLookupFailed(): URLError_Code
Swift declaration
static var dnsLookupFailed: URLError.Code { get }

The host address could not be found via DNS lookup.

get · iOS 8.0+

fileIsDirectory

TypeScript
get fileIsDirectory(): URLError_Code
Swift declaration
static var fileIsDirectory: URLError.Code { get }

A request for an FTP file resulted in the server responding that the file is not a plain file, but a directory.

get · iOS 8.0+

cannotCreateFile

TypeScript
get cannotCreateFile(): URLError_Code
Swift declaration
static var cannotCreateFile: URLError.Code { get }

A download task couldn't create the downloaded file on disk because of an I/O failure.

get · iOS 8.0+

cannotRemoveFile

TypeScript
get cannotRemoveFile(): URLError_Code
Swift declaration
static var cannotRemoveFile: URLError.Code { get }

A download task was unable to remove a downloaded file from disk.

get · iOS 8.0+

fileDoesNotExist

TypeScript
get fileDoesNotExist(): URLError_Code
Swift declaration
static var fileDoesNotExist: URLError.Code { get }

A file does not exist.

get · iOS 8.0+

zeroByteResource

TypeScript
get zeroByteResource(): URLError_Code
Swift declaration
static var zeroByteResource: URLError.Code { get }

A server reported that a URL has a non-zero content length, but terminated the network connection gracefully without sending any data.

get · iOS 8.0+

badServerResponse

TypeScript
get badServerResponse(): URLError_Code
Swift declaration
static var badServerResponse: URLError.Code { get }

The URL Loading system received bad data from the server.

get · iOS 8.0+

cannotWriteToFile

TypeScript
get cannotWriteToFile(): URLError_Code
Swift declaration
static var cannotWriteToFile: URLError.Code { get }

A download task was unable to write to the downloaded file on disk.

get · iOS 8.0+

cannotConnectToHost

TypeScript
get cannotConnectToHost(): URLError_Code
Swift declaration
static var cannotConnectToHost: URLError.Code { get }

An attempt to connect to a host failed.

get · iOS 8.0+

cannotDecodeRawData

TypeScript
get cannotDecodeRawData(): URLError_Code
Swift declaration
static var cannotDecodeRawData: URLError.Code { get }

Content data received during a connection request could not be decoded for a known content encoding.

get · iOS 8.0+

cannotParseResponse

TypeScript
get cannotParseResponse(): URLError_Code
Swift declaration
static var cannotParseResponse: URLError.Code { get }

A task could not parse a response.

get · iOS 8.0+

resourceUnavailable

TypeScript
get resourceUnavailable(): URLError_Code
Swift declaration
static var resourceUnavailable: URLError.Code { get }

A requested resource couldn't be retrieved.

get · iOS 8.0+

httpTooManyRedirects

TypeScript
get httpTooManyRedirects(): URLError_Code
Swift declaration
static var httpTooManyRedirects: URLError.Code { get }

A redirect loop has been detected or the threshold for number of allowable redirects has been exceeded (currently 16).

get · iOS 8.0+

cannotLoadFromNetwork

TypeScript
get cannotLoadFromNetwork(): URLError_Code
Swift declaration
static var cannotLoadFromNetwork: URLError.Code { get }

A request to load an item only from the cache could not be satisfied.

get · iOS 8.0+

networkConnectionLost

TypeScript
get networkConnectionLost(): URLError_Code
Swift declaration
static var networkConnectionLost: URLError.Code { get }

A client or server connection was severed in the middle of an in-progress load.

get · iOS 8.0+

notConnectedToInternet

TypeScript
get notConnectedToInternet(): URLError_Code
Swift declaration
static var notConnectedToInternet: URLError.Code { get }

A network resource was requested, but an internet connection has not been established and cannot be established automatically.

get · iOS 8.0+

secureConnectionFailed

TypeScript
get secureConnectionFailed(): URLError_Code
Swift declaration
static var secureConnectionFailed: URLError.Code { get }

An attempt to establish a secure connection failed for reasons that can't be expressed more specifically.

get · iOS 8.0+

cannotDecodeContentData

TypeScript
get cannotDecodeContentData(): URLError_Code
Swift declaration
static var cannotDecodeContentData: URLError.Code { get }

Content data received during a connection request had an unknown content encoding.

get · iOS 8.0+

internationalRoamingOff

TypeScript
get internationalRoamingOff(): URLError_Code
Swift declaration
static var internationalRoamingOff: URLError.Code { get }

The attempted connection required activating a data context while roaming, but international roaming is disabled.

get · iOS 8.0+

noPermissionsToReadFile

TypeScript
get noPermissionsToReadFile(): URLError_Code
Swift declaration
static var noPermissionsToReadFile: URLError.Code { get }

A resource couldn't be read because of insufficient permissions.

get · iOS 8.0+

dataLengthExceedsMaximum

TypeScript
get dataLengthExceedsMaximum(): URLError_Code
Swift declaration
static var dataLengthExceedsMaximum: URLError.Code { get }

The length of the resource data exceeds the maximum allowed.

get · iOS 8.0+

clientCertificateRejected

TypeScript
get clientCertificateRejected(): URLError_Code
Swift declaration
static var clientCertificateRejected: URLError.Code { get }

A server certificate was rejected.

get · iOS 8.0+

clientCertificateRequired

TypeScript
get clientCertificateRequired(): URLError_Code
Swift declaration
static var clientCertificateRequired: URLError.Code { get }

A client certificate was required to authenticate an SSL connection during a request.

get · iOS 8.0+

requestBodyStreamExhausted

TypeScript
get requestBodyStreamExhausted(): URLError_Code
Swift declaration
static var requestBodyStreamExhausted: URLError.Code { get }

A body stream is needed but the client did not provide one.

get · iOS 8.0+

serverCertificateUntrusted

TypeScript
get serverCertificateUntrusted(): URLError_Code
Swift declaration
static var serverCertificateUntrusted: URLError.Code { get }

A server certificate was signed by a root server that isn't trusted.

get · iOS 8.0+

userAuthenticationRequired

TypeScript
get userAuthenticationRequired(): URLError_Code
Swift declaration
static var userAuthenticationRequired: URLError.Code { get }

Authentication is required to access a resource.

get · iOS 8.0+

serverCertificateHasBadDate

TypeScript
get serverCertificateHasBadDate(): URLError_Code
Swift declaration
static var serverCertificateHasBadDate: URLError.Code { get }

A server certificate had a date which indicates it has expired, or is not yet valid.

get · iOS 8.0+

userCancelledAuthentication

TypeScript
get userCancelledAuthentication(): URLError_Code
Swift declaration
static var userCancelledAuthentication: URLError.Code { get }

An asynchronous request for authentication has been canceled by the user.

get · iOS 8.0+

serverCertificateNotYetValid

TypeScript
get serverCertificateNotYetValid(): URLError_Code
Swift declaration
static var serverCertificateNotYetValid: URLError.Code { get }

A server certificate is not yet valid.

get · iOS 8.0+

redirectToNonExistentLocation

TypeScript
get redirectToNonExistentLocation(): URLError_Code
Swift declaration
static var redirectToNonExistentLocation: URLError.Code { get }

A redirect was specified by way of server response code, but the server did not accompany this code with a redirect URL.

get · iOS 8.0+

downloadDecodingFailedMidStream

TypeScript
get downloadDecodingFailedMidStream(): URLError_Code
Swift declaration
static var downloadDecodingFailedMidStream: URLError.Code { get }

A download task failed to decode an encoded file during the download.

get · iOS 8.0+

serverCertificateHasUnknownRoot

TypeScript
get serverCertificateHasUnknownRoot(): URLError_Code
Swift declaration
static var serverCertificateHasUnknownRoot: URLError.Code { get }

A server certificate was not signed by any root server.

get · iOS 8.0+

backgroundSessionWasDisconnected

TypeScript
get backgroundSessionWasDisconnected(): URLError_Code
Swift declaration
static var backgroundSessionWasDisconnected: URLError.Code { get }

The app is suspended or exits while a background data task is processing.

get · iOS 8.0+

downloadDecodingFailedToComplete

TypeScript
get downloadDecodingFailedToComplete(): URLError_Code
Swift declaration
static var downloadDecodingFailedToComplete: URLError.Code { get }

A download task failed to decode an encoded file after downloading.

get · iOS 8.0+

backgroundSessionInUseByAnotherProcess

TypeScript
get backgroundSessionInUseByAnotherProcess(): URLError_Code
Swift declaration
static var backgroundSessionInUseByAnotherProcess: URLError.Code { get }

An app or app extension attempted to connect to a background session that is already connected to a process.

get · iOS 8.0+

backgroundSessionRequiresSharedContainer

TypeScript
get backgroundSessionRequiresSharedContainer(): URLError_Code
Swift declaration
static var backgroundSessionRequiresSharedContainer: URLError.Code { get }

The shared container identifier of the URL session configuration is needed but has not been set.

get · iOS 9.0+

appTransportSecurityRequiresSecureConnection

TypeScript
get appTransportSecurityRequiresSecureConnection(): URLError_Code
Swift declaration
static var appTransportSecurityRequiresSecureConnection: URLError.Code { get }

App Transport Security disallowed a connection because there is no secure network connection.

get · iOS 8.0+

badURL

TypeScript
get badURL(): URLError_Code
Swift declaration
static var badURL: URLError.Code { get }

A malformed URL prevented a URL request from being initiated.

get · iOS 8.0+

unknown

TypeScript
get unknown(): URLError_Code
Swift declaration
static var unknown: URLError.Code { get }

The URL Loading System encountered an error that it can't interpret.

init · iOS 8.0+

init

TypeScript
init(rawValue: number): URLError_Code
Swift declaration
init(rawValue: Int)

Creates a new instance with the specified raw value. If there is no value of the type that corresponds with the specified raw value, this initializer returns `nil`. For example: enum PaperSize: String { case A4, A5, Letter, Legal } print(PaperSize(rawValue: "Legal")) // Prints "Optional(PaperSize.Legal)" print(PaperSize(rawValue: "Tabloid")) // Prints "nil" - Parameter rawValue: The raw value to use for the new instance.

get · iOS 8.0+

rawValue

TypeScript
getRawValue($self: URLError_Code): number
Swift declaration
let rawValue: Int

The corresponding value of the raw type. A new instance initialized with `rawValue` will be equivalent to this instance. For example: enum PaperSize: String { case A4, A5, Letter, Legal } let selectedSize = PaperSize.Letter print(selectedSize.rawValue) // Prints "Letter" print(selectedSize == PaperSize(rawValue: selectedSize.rawValue)!) // Prints "true"

get · iOS 8.0+

timedOut

TypeScript
get timedOut(): URLError_Code
Swift declaration
static var timedOut: URLError.Code { get }

An asynchronous operation timed out.

get · iOS 8.0+

cancelled

TypeScript
get cancelled(): URLError_Code
Swift declaration
static var cancelled: URLError.Code { get }

An asynchronous load has been canceled.

Skipped declarations

No declarations were skipped in this snapshot.

All Foundation types →