2023年12月15日发(作者:)

UnsupportedHTTP Code301Description“The credentials provided for an authenticated connection wererejected by the server.”“The connection to the server was dropped. This usually indicates ahighly overloaded server.”“The HTTP server response could not be parsed.”“Too many HTTP redirects occurred before reaching a page thatdid not redirect the client to another page. This usually indicates aredirect loop.”“The requested URL could not be retrieved.”“A connection could not be established to the HTTP proxy.”“The authentication credentials provided for logging into the proxywere rejected.”“An error occurred with the proxy autoconfiguration file.”“The authentication credentials provided by the proxyautoconfiguration file were rejected.”“A connection could not be established to the HTTPS proxy.”
kCFErrorHTTPBadCredentials
kCFErrorHTTPConnectionLost302303304
kCFErrorHTTPParseFailure
kCFErrorHTTPRedirectionLoopDetected305306
kCFErrorHTTPBadURL
kCFErrorHTTPProxyConnectionFailure
kCFErrorHTTPBadProxyCredentials307308
kCFErrorPACFileError
kCFErrorPACFileAuth309
kCFErrorHTTPSProxyConnectionFailure310
kCFStreamErrorHTTPSProxyFailureUnexpectedResponseToCONNECTMethod311“The HTTPS proxy returned an unexpected status code, such as a3xx redirect.”CFURLConnection CodeCFURLConnection Code-998-999Description“An unknown error occurred.”“The connection was cancelled.”“The connection failed due to a malformedURL.”“The connection timed out.”
kCFURLErrorUnknown
kCFURLErrorCancelled
NSURLErrorCancelled-1000
kCFURLErrorBadURL
NSURLErrorBadURL-1001-
kCFURLErrorTimedOut
NSURLErrorTimedOut
kCFURLErrorUnsupportedURL
NSURLErrorUnsupportedURL1002-“The connection failed due to an unsupportedURL scheme.”
kCFURLErrorCannotFindHost
NSURLErrorCannotFindHost1003-“The connection failed because the host couldnot be found.”
kCFURLErrorCannotConnectToHost
NSURLErrorCannotConnectToHost1004-“The connection failed because a connectioncannot be made to the host.”
kCFURLErrorNetworkConnectionLost
NSURLErrorNetworkConnectionLost1005-“The connection failed because the networkconnection was lost.”“The connection failed because the DNS lookup

1006
kCFURLErrorDNSLookupFailed
NSURLErrorDCFURLConnection CodeCFURLConnection CodeNSLookupFailed-failed.”Description
kCFURLErrorHTTPTooManyRedirects
NSURLErrorHTTPTooManyRedirects1007-“The HTTP connection failed due to too manyredirects.”
kCFURLErrorResourceUnavailable
NSURLErrorResourceUnavailable1008-“The connection’s resource is unavailable.”
kCFURLErrorNotConnectedToInternet
NSURLErrorNotConnectedToInternet1009-“The connection failed because the device isnot connected to the internet.”
kCFURLErrorRedirectToNonExistentLocation
NSURLErrorRedirectToNonExistentLocation1010-“The connection was redirected to anonexistent location.”
kCFURLErrorBadServerResponse
NSURLErrorBadServerResponse1011-“The connection received an invalid serverresponse.”
kCFURLErrorUserCancelledAuthentication
NSURLErrorUserCancelledAuthentication1012-“The connection failed because the usercancelled required authentication.”
kCFURLErrorUserAuthenticationRequired
NSURLErrorUserAuthenticationRequired1013-“The connection failed because authenticationis required.”
kCFURLErrorZeroByteResource
NSURLErrorZeroByteResource1014-“The resource retrieved by the connection iszero bytes.”
kCFURLErrorCannotDecodeRawData
NSURLErrorCannotDecodeRawData1015“The connection cannot decode data encodedwith a known content encoding.”“The connection cannot decode data encodedwith an unknown content encoding.”“The connection cannot parse the server’sresponse.”“The connection failed because internationalroaming is disabled on the device.”“The connection failed because a call isactive.”“The connection failed because data use iscurrently not allowed on the device.”“The connection failed because its request’sbody stream was exhausted.”
kCFURLErrorCannotDecodeContentData
NSURLErrorCannotDecodeContentData1016-
kCFURLErrorCannotParseResponse
NSURLErrorCannotParseResponse1017-1018
kCFURLErrorInternationalRoamingOff
kCFURLErrorCallIsActive
kCFURLErrorDataNotAllowed
kCFURLErrorRequestBodyStreamExhausted-1019-1020-1021File Code-Description“The file operation failed because the file doesnot exist.”
kCFURLErrorFileDoesNotExist
NSURLErrorFileDoesNotExist1100

File Code1101
kCFURLErrorFileIsDirectory
NSURLErrorFileIsDirectory--“The file operation failed because the file is aDescriptiondirectory.”
kCFURLErrorNoPermissionsToReadFile
NSURLErrorNoPermissionsToReadFile1102-“The file operation failed because it does nothave permission to read the file.”
kCFURLErrorDataLengthExceedsMaximum
NSURLErrorDataLengthExceedsMaximum1103“The file operation failed because the file is toolarge.”SSL Code-Description“The secure connection failed for an unknownreason.”
kCFURLErrorSecureConnectionFailed
NSURLErrorSecureConnectionFailed1200-
kCFURLErrorServerCertificateHasBadDate
NSURLErrorServerCertificateHasBadDate1201-“The secure connection failed because theserver’s certificate has an invalid date.”
kCFURLErrorServerCertificateUntrusted
NSURLErrorServerCertificateUntrusted1202-“The secure connection failed because theserver’s certificate is not trusted.”
kCFURLErrorServerCertificateHasUnknownRoot
NSURLErrorServerCertificateHasUnknownRoot1203-“The secure connection failed because theserver’s certificate has an unknown root.”
kCFURLErrorServerCertificateNotYetValid
NSURLErrorServerCertificateNotYetValid1204-“The secure connection failed because theserver’s certificate is not yet valid.”
kCFURLErrorClientCertificateRejected
NSURLErrorClientCertificateRejected1205-“The secure connection failed because theclient’s certificate was rejected.”
kCFURLErrorClientCertificateRequired
NSURLErrorClientCertificateRequired1206“The secure connection failed because theserver requires a client certificate.”Download I/O CodeDownload I/O Code-Description“The connection failed because it is being requiredto return a cached resource, but one is notavailable.”
kCFURLErrorCannotLoadFromNetwork
NSURLErrorCannotLoadFromNetwork2000-
kCFURLErrorCannotCreateFile
NSURLErrorCannotCreateFile3000-“The file cannot be created.”
kCFURLErrorCannotOpenFile
NSURLErrorCannotOpenFile3001-“The file cannot be opened.”
kCFURLErrorCannotCloseFile
NSURLErrorCannotCloseFile3002-3003“The file cannot be closed.”
kCFURLErrorCannotWriteToFile
NSURLErr“The file cannot be written.”

orCannotWriteToFileDownload I/O CodeDownload I/O Code-Description“The file cannot be removed.”
kCFURLErrorCannotRemoveFile
NSURLErrorCannotRemoveFile3004-
kCFURLErrorCannotMoveFile
NSURLErrorCannotMoveFile3005-“The file cannot be moved.”
kCFURLErrorDownloadDecodingFailedMidStream
NSURLErrorDownloadDecodingFailedMidStream3006-“The download failed because decoding of thedownloaded data failed mid-stream.”
kCFURLErrorDownloadDecodingFailedToComplete
NSURLErrorDownloadDecodingFailedToComplete30073840“The download failed because decoding of thedownloaded data failed to complete.”“JSON text did not start with array or object andoption to allow fragments not set.”Cookie Code-4000Description“The cookie file cannot be parsed.”
kCFHTTPCookieCannotParseCookieFileCFNetServices Code
kCFNetServiceErrorUnknown-72000LDescription“An unknown error occurred.”
kCFNetServiceErrorCollision72001L“An attempt was made to use a name that is already in use.”
kCFNetServiceErrorNotFound-72002L“Not used.”“A new search could not be started because a search is already inprogress.”
kCFNetServiceErrorInProgress72003L
kCFNetServiceErrorBadArgument-72004L“A required argument was not provided or was not valid.”
kCFNetServiceErrorCancel-72005L“The search or service was cancelled.”
kCFNetServiceErrorInvalid-72006L“Invalid data was passed to a CFNetServices function.”
kCFNetServiceErrorTimeout-72007L“A search failed because it timed out.”
kCFNetServiceErrorDNSServiceFailure-73000L“An error from DNS discovery; look at kCFDNSServiceFailureKey to get theerror number and interpret using dnssd.h”