Last active
September 29, 2023 15:56
-
-
Save floriankugler/6870499 to your computer and use it in GitHub Desktop.
Mapping of NSURLConnection to NSURLSession delegate methods. Created by Mattt Thompson.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
NSURLConnection | NSURLSession | |
------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------- | |
NSURLConnectionDelegate connectionShouldUseCredentialStorage: | | |
------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------- | |
NSURLConnectionDelegate connection:willSendRequestForAuthenticationChallenge: | NSURLSessionDelegate URLSession:didReceiveChallenge:completionHandler: | |
| NSURLSessionTaskDelegate URLSession:task:didReceiveChallenge:completionHandler: | |
------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------- | |
NSURLConnectionDelegate connection:willCacheResponse: | NSURLSessionDataDelegate URLSession:dataTask:willCacheResponse:completionHandler: | |
------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------- | |
NSURLConnectionDelegate connection:didFailWithError: | NSURLSessionTaskDelegate URLSession:task:didCompleteWithError: | |
NSURLConnectionDataDelegate connectionDidFinishLoading: | | |
------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------- | |
NSURLConnectionDataDelegate connection:willSendRequest:redirectResponse: | NSURLSessionTaskDelegate URLSession:willPerformHTTPRedirection:newRequest:completionHandler: | |
------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------- | |
NSURLConnectionDataDelegate connection:didReceiveResponse: | NSURLSessionDataDelegate URLSession:dataTask:didReceiveResponse:completionHandler: | |
------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------- | |
NSURLConnectionDataDelegate connection:didReceiveData: | NSURLSessionDataDelegate URLSession:dataTask:didReceiveData: | |
------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------- | |
NSURLConnectionDataDelegate connection:needNewBodyStream: | | |
------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------- | |
NSURLConnectionDataDelegate connection:didSendBodyData:totalBytesWritten:totalBytesExpectedToWrite: | | |
------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------- | |
NSURLConnectionDownloadDelegate connection:didWriteData:totalBytesWritten:expectedTotalBytes: | NSURLSessionTaskDelegate URLSession:task:didSendBodyData:totalBytesSent:totalBytesExpectedToSend: | |
------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------- | |
NSURLConnectionDownloadDelegate connectionDidResumeDownloading:totalBytesWritten:expectedTotalBytes: | | |
------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------- | |
NSURLConnectionDownloadDelegate connectionDidFinishDownloading:destinationURL: | NSURLSessionDownloadDelegate URLSession:downloadTask:didFinishDownloadingToURL: | |
------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------- | |
| NSURLSessionDelegate URLSession:didBecomeInvalidWithError: | |
------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------- | |
| NSURLSessionDataDelegate URLSession:dataTask:didBecomeDownloadTask: | |
------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------- | |
| NSURLSessionDataDelegate URLSessionDidFinishEventsForBackgroundURLSession: | |
------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------- | |
| NSURLSessionDownloadDelegate URLSession:downloadTask:didWriteData:totalBytesWritten:totalBytesWritten:totalBytesExpectedToWrite: | |
------------------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------- | |
| NSURLSessionDownloadDelegate URLSession:downloadTask:didResumeAtOffset:expectedTotalBytes: | |
Thanks a lot!
Good!Thanks!
many thanks!
Still helping developers in 2018!
awesome to see this! thanks.
Thanks a lot.
Good job, thx.
connection:didWriteData:totalBytesWritten:expectedTotalBytes:
matching URLSession:task:didSendBodyData:totalBytesSent:totalBytesExpectedToSend:
, is it an unintentional mistake ?
Thinks a lot!
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Yeah! Gracias