Swift3: Type 'NSObject' does not conform to protocol 'URLAuthenticationChallengeSender'
<p>In Swift3 'NSURLAuthenticationChallengeSender' changed to 'URLAuthenticationChallengeSender' so in delegate methods also change from NSURlAuthentication to URLAuthentication(Auto Xcode edits) </p>

<p>I am confused wether i am missing still any delegate methods but included all below delegated methods still it shows error as above .</p>

<p>If any one facing the same issue can you please help in this!!!</p>

<p>Swift3</p>

<pre><code>class GeneralFunctions: NSObject,NSURLConnectionDataDelegate,URLAuthenticationChallengeSender {

}
</code></pre>

<p>Delegate Methods</p>

<pre><code>func connection(connection: NSURLConnection, willSendRequestForAuthenticationChallenge challenge: URLAuthenticationChallenge) {
}

func connection(connection: NSURLConnection, didReceiveResponse:URLResponse)
{
}

func connection(connection: NSURLConnection, didReceiveData data: NSData) {
}

func connection(connection: NSURLConnection, didFailWithError error: NSError) {
    print("Connection Failed")
}


func connection(connection: NSURLConnection, didReceiveAuthenticationChallenge challenge: URLAuthenticationChallenge) {
    //sanju swift3 160922-- re verify 

//        let myCredential = URLCredential(forTrust: challenge.protectionSpace.serverTrust!)
   //        challenge.sender!.useCredential(myCredential, forAuthenticationChallenge: challenge)
}

func connection(connection: NSURLConnection, canAuthenticateAgainstProtectionSpace protectionSpace: URLProtectionSpace) -&gt; Bool {
    return true
}
func URLSession(session: URLSession, didReceiveChallenge challenge: URLAuthenticationChallenge, completionHandler: (URLSession.AuthChallengeDisposition, URLCredential) -&gt; Void) {

    let protectionSpace = challenge.protectionSpace

    let theSender = challenge.sender

    if protectionSpace.authenticationMethod == NSURLAuthenticationMethodServerTrust {

        if let theTrust = protectionSpace.serverTrust{

            let theCredential = URLCredential(trust: theTrust)

            theSender?.use(theCredential, for: challenge)

            return
        }
    }

    theSender?.performDefaultHandling!(for: challenge)

    return
}
</code></pre>