Instance Method

urlProtocol(_:didReceive:)

Tells the client that the URL Loading System received an authentication challenge.

Required.

Declaration

func urlProtocol(_ protocol: URLProtocol, didReceive challenge: URLAuthenticationChallenge)

Parameters

protocol

The URL protocol object sending the message.

challenge

The authentication challenge that has been received.

Discussion

The protocol client guarantees that it will answer the request on the same thread that called this method. The client may add a default credential to the challenge it issues to the connection delegate, if protocol did not provide one.

See Also

Handling Authentication Challenges

func urlProtocol(URLProtocol, didCancel: URLAuthenticationChallenge)

Tells the client that an authentication challenge has been canceled.

Required.

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software