Currently on Xcode8 beta 6.
func urlSession(_ session: URLSession, dataTask: URLSessionDataTask, didReceive response: URLResponse, completionHandler:
(URLSession.ResponseDisposition) -> Void) {
// NOT CALLED
}I'm trying to use this method, it occurs a warning:
Instance method 'urlSession(_:dataTask:didRecieve:completionHandler:)' nearly matches optional requirement 'urlSession(_:dataTask:didReceive:completionHandler:)'
of protocol 'URLSessionDataDelegate'
Fix-it Make 'urlSession(_dataTask:didReceive:completionHandler:)' private to silence this warning
Fix-it Add '@nonobjc' to silence this warningHowever, no matter which method I use to fix the warning, this function seems not working.