Contents

webView(_:authenticationChallenge:shouldAllowDeprecatedTLS:)

Asks the delegate whether to continue with a connection that uses a deprecated version of TLS.

Declaration

optional func webView(_ webView: WKWebView, authenticationChallenge challenge: URLAuthenticationChallenge, shouldAllowDeprecatedTLS decisionHandler: @escaping @MainActor @Sendable (Bool) -> Void)
optional func webView(_ webView: WKWebView, shouldAllowDeprecatedTLSFor challenge: URLAuthenticationChallenge) async -> Bool

Parameters

  • webView:

    The web view that receives the authentication challenge.

  • challenge:

    The authentication challenge.

  • decisionHandler:

    The completion handler block to execute with the decision. This handler has no return value and takes the following parameter:

    decision

    A Boolean value that indicates whether to continue to use a deprecated version of TLS. Specify True to continue, or False to reject the connection.

Discussion

If you don’t implement this method, the web view uses system settings to determine whether to allow the use of deprecated versions of TLS.

See Also

Responding to authentication challenges