Instantly share code, notes, and snippets.

Embed
What would you like to do?
Mapping of NSURLConnection to NSURLSession delegate methods. Created by Mattt Thompson.
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:
@wagppinto

This comment has been minimized.

Copy link

wagppinto commented Sep 8, 2015

wow, life saver! Thank you

@alemangui

This comment has been minimized.

Copy link

alemangui commented Oct 8, 2015

Awesome, thanks!

@grapefruitpower

This comment has been minimized.

Copy link

grapefruitpower commented Oct 13, 2015

thanks!

@chenzilu1990

This comment has been minimized.

Copy link

chenzilu1990 commented Dec 2, 2015

soga

@jackhub

This comment has been minimized.

Copy link

jackhub commented Dec 9, 2015

Thanks a lot!

@dmhts

This comment has been minimized.

Copy link

dmhts commented Dec 24, 2015

Woah! Thanks!

@wanggang316

This comment has been minimized.

Copy link

wanggang316 commented Dec 25, 2015

Thanks!

@githubdelegate

This comment has been minimized.

Copy link

githubdelegate commented Feb 5, 2016

Thanks

@YuliiaVeres

This comment has been minimized.

Copy link

YuliiaVeres commented Feb 14, 2016

Thanks !!!

@swifterfit

This comment has been minimized.

Copy link

swifterfit commented Feb 25, 2016

Thanks

@matchboxy

This comment has been minimized.

Copy link

matchboxy commented Apr 19, 2016

lift saver, tks

@seyi

This comment has been minimized.

Copy link

seyi commented Apr 20, 2016

wow..thanks

@melote

This comment has been minimized.

Copy link

melote commented Jun 21, 2016

great, thanks a lot.

@starmuse

This comment has been minimized.

Copy link

starmuse commented Aug 31, 2016

nice

@deckarlc

This comment has been minimized.

Copy link

deckarlc commented Sep 1, 2016

wow, nice~

@naeemshaikh90

This comment has been minimized.

Copy link

naeemshaikh90 commented Sep 7, 2016

Great Work

@wongzigii

This comment has been minimized.

Copy link

wongzigii commented Feb 12, 2017

👍

@Jerry4me

This comment has been minimized.

Copy link

Jerry4me commented Mar 20, 2017

Marvelous! Thanks.

@carlosvKC

This comment has been minimized.

Copy link

carlosvKC commented May 10, 2017

Yeah! Gracias

@rememberkarl

This comment has been minimized.

Copy link

rememberkarl commented Jul 12, 2017

Thanks a lot!

@xiaohuiCoding

This comment has been minimized.

Copy link

xiaohuiCoding commented Jul 17, 2017

Good!Thanks!

@himyfairy

This comment has been minimized.

Copy link

himyfairy commented Sep 5, 2017

many thanks!

@timcolla

This comment has been minimized.

Copy link

timcolla commented Jan 24, 2018

Still helping developers in 2018!

@zihanzzz

This comment has been minimized.

Copy link

zihanzzz commented Mar 13, 2018

awesome to see this! thanks.

@coderChrisLee

This comment has been minimized.

Copy link

coderChrisLee commented May 21, 2018

Thanks a lot.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment