networking with nsurlsession - apple inc. · 2016. 7. 8. · nsurlsession api for downloading http...

141
© 2015 Apple Inc. All rights reserved. Redistribution or public display not permitted without written permission from Apple. #WWDC15 Networking with NSURLSession Luke Case Software Engineer Andreas Garkuscha Software Engineer Dan Vinegrad Software Engineer System Frameworks Session 711

Upload: others

Post on 01-Sep-2020

2 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Networking with NSURLSession - Apple Inc. · 2016. 7. 8. · NSURLSession API for downloading HTTP content Rich set of delegate methods Background download/upload capability

© 2015 Apple Inc. All rights reserved. Redistribution or public display not permitted without written permission from Apple.

#WWDC15

Networking with NSURLSession

Luke Case Software EngineerAndreas Garkuscha Software EngineerDan Vinegrad Software Engineer

System Frameworks

Session 711

Page 2: Networking with NSURLSession - Apple Inc. · 2016. 7. 8. · NSURLSession API for downloading HTTP content Rich set of delegate methods Background download/upload capability
Page 3: Networking with NSURLSession - Apple Inc. · 2016. 7. 8. · NSURLSession API for downloading HTTP content Rich set of delegate methods Background download/upload capability

App Transport Security

New protocol support in NSURLSession

NSURLSession on watchOS

NSURLSession API changes

Page 4: Networking with NSURLSession - Apple Inc. · 2016. 7. 8. · NSURLSession API for downloading HTTP content Rich set of delegate methods Background download/upload capability

NSURLSession

API for downloading HTTP contentRich set of delegate methodsBackground download/upload capability

Page 5: Networking with NSURLSession - Apple Inc. · 2016. 7. 8. · NSURLSession API for downloading HTTP content Rich set of delegate methods Background download/upload capability

HTTP(cleartext)

Page 6: Networking with NSURLSession - Apple Inc. · 2016. 7. 8. · NSURLSession API for downloading HTTP content Rich set of delegate methods Background download/upload capability

HTTP(cleartext)

GET

HTTP/1.1 200 OK

Page 7: Networking with NSURLSession - Apple Inc. · 2016. 7. 8. · NSURLSession API for downloading HTTP content Rich set of delegate methods Background download/upload capability

HTTP(cleartext)

Page 8: Networking with NSURLSession - Apple Inc. · 2016. 7. 8. · NSURLSession API for downloading HTTP content Rich set of delegate methods Background download/upload capability

HTTP(cleartext)

Page 9: Networking with NSURLSession - Apple Inc. · 2016. 7. 8. · NSURLSession API for downloading HTTP content Rich set of delegate methods Background download/upload capability

HTTP(cleartext)

Page 10: Networking with NSURLSession - Apple Inc. · 2016. 7. 8. · NSURLSession API for downloading HTTP content Rich set of delegate methods Background download/upload capability
Page 11: Networking with NSURLSession - Apple Inc. · 2016. 7. 8. · NSURLSession API for downloading HTTP content Rich set of delegate methods Background download/upload capability

HTTPS

Page 12: Networking with NSURLSession - Apple Inc. · 2016. 7. 8. · NSURLSession API for downloading HTTP content Rich set of delegate methods Background download/upload capability

HTTPS

Page 13: Networking with NSURLSession - Apple Inc. · 2016. 7. 8. · NSURLSession API for downloading HTTP content Rich set of delegate methods Background download/upload capability

HTTPSHTTP over TLS

EncryptionIntegrityAuthentication

Page 14: Networking with NSURLSession - Apple Inc. · 2016. 7. 8. · NSURLSession API for downloading HTTP content Rich set of delegate methods Background download/upload capability

Protecting Customer DataHTTPS: securing HTTP with TLS

"http://" to "https://"Server support requiredWidespread support availableAll data is sensitive

Page 15: Networking with NSURLSession - Apple Inc. · 2016. 7. 8. · NSURLSession API for downloading HTTP content Rich set of delegate methods Background download/upload capability

App Transport Security

Page 16: Networking with NSURLSession - Apple Inc. · 2016. 7. 8. · NSURLSession API for downloading HTTP content Rich set of delegate methods Background download/upload capability

Protecting Customer DataWhat is App Transport Security (ATS)?

Disallows cleartext HTTP URL loadsEncourages best practice secure connectionsDefaults to stronger securityAllows configuration via app's Info.plist

Page 17: Networking with NSURLSession - Apple Inc. · 2016. 7. 8. · NSURLSession API for downloading HTTP content Rich set of delegate methods Background download/upload capability
Page 18: Networking with NSURLSession - Apple Inc. · 2016. 7. 8. · NSURLSession API for downloading HTTP content Rich set of delegate methods Background download/upload capability
Page 19: Networking with NSURLSession - Apple Inc. · 2016. 7. 8. · NSURLSession API for downloading HTTP content Rich set of delegate methods Background download/upload capability

HTTPS

Page 20: Networking with NSURLSession - Apple Inc. · 2016. 7. 8. · NSURLSession API for downloading HTTP content Rich set of delegate methods Background download/upload capability
Page 21: Networking with NSURLSession - Apple Inc. · 2016. 7. 8. · NSURLSession API for downloading HTTP content Rich set of delegate methods Background download/upload capability

NSAppTransportSecurity NSExceptionDomains "example.com" NSIncludesSubdomains = YES NSExceptionRequiresForwardSecrecy = NO NSExceptionMinimumTLSVersion = "TLSv1.1"

Page 22: Networking with NSURLSession - Apple Inc. · 2016. 7. 8. · NSURLSession API for downloading HTTP content Rich set of delegate methods Background download/upload capability

HTTPS

Page 23: Networking with NSURLSession - Apple Inc. · 2016. 7. 8. · NSURLSession API for downloading HTTP content Rich set of delegate methods Background download/upload capability

HTTPS

MediaServer

Page 24: Networking with NSURLSession - Apple Inc. · 2016. 7. 8. · NSURLSession API for downloading HTTP content Rich set of delegate methods Background download/upload capability

NSAppTransportSecurity NSExceptionDomains "media.example.com" NSExceptionAllowsInsecureHTTPLoads = YES

Page 25: Networking with NSURLSession - Apple Inc. · 2016. 7. 8. · NSURLSession API for downloading HTTP content Rich set of delegate methods Background download/upload capability
Page 26: Networking with NSURLSession - Apple Inc. · 2016. 7. 8. · NSURLSession API for downloading HTTP content Rich set of delegate methods Background download/upload capability

NSAppTransportSecurity NSAllowsArbitraryLoads = YES

Page 27: Networking with NSURLSession - Apple Inc. · 2016. 7. 8. · NSURLSession API for downloading HTTP content Rich set of delegate methods Background download/upload capability
Page 28: Networking with NSURLSession - Apple Inc. · 2016. 7. 8. · NSURLSession API for downloading HTTP content Rich set of delegate methods Background download/upload capability

Server

Page 29: Networking with NSURLSession - Apple Inc. · 2016. 7. 8. · NSURLSession API for downloading HTTP content Rich set of delegate methods Background download/upload capability
Page 30: Networking with NSURLSession - Apple Inc. · 2016. 7. 8. · NSURLSession API for downloading HTTP content Rich set of delegate methods Background download/upload capability

NSAppTransportSecurity NSAllowsArbitraryLoads NSExceptionDomains "secure.example.com" NSExceptionAllowsInsecureHTTPLoads = NO

Page 31: Networking with NSURLSession - Apple Inc. · 2016. 7. 8. · NSURLSession API for downloading HTTP content Rich set of delegate methods Background download/upload capability

Configuring ATSDiagnosing issues

Active when you build your app for iOS 9 and OS X El Capitan"http://" to "https://" is automaticUse NSAllowsArbitraryLoads for quick triage Log NSURLSession errorsCFNETWORK_DIAGNOSTICS=1

Page 32: Networking with NSURLSession - Apple Inc. · 2016. 7. 8. · NSURLSession API for downloading HTTP content Rich set of delegate methods Background download/upload capability

Protecting Customer DataNext steps

Use HTTPS for new projectsTransition existing apps from HTTP to HTTPSUse exceptions where needed

Page 33: Networking with NSURLSession - Apple Inc. · 2016. 7. 8. · NSURLSession API for downloading HTTP content Rich set of delegate methods Background download/upload capability

New Protocol Support in NSURLSession

Andreas GarkuschaSoftware Engineer

Page 34: Networking with NSURLSession - Apple Inc. · 2016. 7. 8. · NSURLSession API for downloading HTTP content Rich set of delegate methods Background download/upload capability

New in NSURLSession

Page 35: Networking with NSURLSession - Apple Inc. · 2016. 7. 8. · NSURLSession API for downloading HTTP content Rich set of delegate methods Background download/upload capability

New in NSURLSession

HTTP/2RFC 7540

Page 36: Networking with NSURLSession - Apple Inc. · 2016. 7. 8. · NSURLSession API for downloading HTTP content Rich set of delegate methods Background download/upload capability

New in NSURLSession

HTTP/2RFC 7540

Page 37: Networking with NSURLSession - Apple Inc. · 2016. 7. 8. · NSURLSession API for downloading HTTP content Rich set of delegate methods Background download/upload capability

New in NSURLSession

Page 38: Networking with NSURLSession - Apple Inc. · 2016. 7. 8. · NSURLSession API for downloading HTTP content Rich set of delegate methods Background download/upload capability

New in NSURLSession

Page 39: Networking with NSURLSession - Apple Inc. · 2016. 7. 8. · NSURLSession API for downloading HTTP content Rich set of delegate methods Background download/upload capability

New in NSURLSession

HTTP/2RFC 7540

Future of the Web

Major milestonein the evolutionof the Web

Makes the Web

fasterSolves HTTP/1.1problems

Page 40: Networking with NSURLSession - Apple Inc. · 2016. 7. 8. · NSURLSession API for downloading HTTP content Rich set of delegate methods Background download/upload capability

HTTP/2 in NSURLSession

Why a new protocol?HTTP/2 in depthAdoption using NSURLSession

Page 41: Networking with NSURLSession - Apple Inc. · 2016. 7. 8. · NSURLSession API for downloading HTTP content Rich set of delegate methods Background download/upload capability

Why a New Protocol?

Page 42: Networking with NSURLSession - Apple Inc. · 2016. 7. 8. · NSURLSession API for downloading HTTP content Rich set of delegate methods Background download/upload capability

Why a New Protocol?

Page 43: Networking with NSURLSession - Apple Inc. · 2016. 7. 8. · NSURLSession API for downloading HTTP content Rich set of delegate methods Background download/upload capability

Why a New Protocol?

FTP HTTP POP3 LDAP RTP

SMTP NTP TCP IMAP UDP

ARP SNMP PPP SOAP ICMP

IP APX Telnet RADIUS VNC

SSH VoIP AFP smb nfsDHCP SKYPE RDP WebSocket RIP

AIM Bonjour ICQ QUAKE3 …

Page 44: Networking with NSURLSession - Apple Inc. · 2016. 7. 8. · NSURLSession API for downloading HTTP content Rich set of delegate methods Background download/upload capability

Why a New Protocol?

FTP HTTP POP3 LDAP RTP

SMTP NTP TCP IMAP UDP

ARP SNMP PPP SOAP ICMP

IP APX Telnet RADIUS VNC

SSH VoIP AFP smb nfsDHCP SKYPE RDP WebSocket RIP

AIM Bonjour ICQ QUAKE3 …

Page 45: Networking with NSURLSession - Apple Inc. · 2016. 7. 8. · NSURLSession API for downloading HTTP content Rich set of delegate methods Background download/upload capability

Why a New Protocol?

Page 46: Networking with NSURLSession - Apple Inc. · 2016. 7. 8. · NSURLSession API for downloading HTTP content Rich set of delegate methods Background download/upload capability

HTTP/1.1 Common Issues

Page 47: Networking with NSURLSession - Apple Inc. · 2016. 7. 8. · NSURLSession API for downloading HTTP content Rich set of delegate methods Background download/upload capability

HTTP/1.1Common issues

One outstanding request

Page 48: Networking with NSURLSession - Apple Inc. · 2016. 7. 8. · NSURLSession API for downloading HTTP content Rich set of delegate methods Background download/upload capability

HTTP/1.1Common issues

One outstanding requestHTTP pipelining

Page 49: Networking with NSURLSession - Apple Inc. · 2016. 7. 8. · NSURLSession API for downloading HTTP content Rich set of delegate methods Background download/upload capability

HTTP/1.1Common issues

One outstanding requestHTTP pipeliningMultiple connections

Page 50: Networking with NSURLSession - Apple Inc. · 2016. 7. 8. · NSURLSession API for downloading HTTP content Rich set of delegate methods Background download/upload capability

HTTP/1.1Common issues

One outstanding requestHTTP pipeliningMultiple connectionsTextual protocol overhead

Page 51: Networking with NSURLSession - Apple Inc. · 2016. 7. 8. · NSURLSession API for downloading HTTP content Rich set of delegate methods Background download/upload capability

HTTP/1.1Common issues

One outstanding requestHTTP pipeliningMultiple connectionsTextual protocol overheadHeader compression

Page 52: Networking with NSURLSession - Apple Inc. · 2016. 7. 8. · NSURLSession API for downloading HTTP content Rich set of delegate methods Background download/upload capability

The Path to HTTP/2

Experimental protocolsSpecification for HTTP/2IETF standardization, RFC

Page 53: Networking with NSURLSession - Apple Inc. · 2016. 7. 8. · NSURLSession API for downloading HTTP content Rich set of delegate methods Background download/upload capability

New in NSURLSession

Page 54: Networking with NSURLSession - Apple Inc. · 2016. 7. 8. · NSURLSession API for downloading HTTP content Rich set of delegate methods Background download/upload capability

New in NSURLSession

HTTP/2RFC 7540

Page 55: Networking with NSURLSession - Apple Inc. · 2016. 7. 8. · NSURLSession API for downloading HTTP content Rich set of delegate methods Background download/upload capability
Page 56: Networking with NSURLSession - Apple Inc. · 2016. 7. 8. · NSURLSession API for downloading HTTP content Rich set of delegate methods Background download/upload capability

HTTP/1.1 HTTP/2

Page 57: Networking with NSURLSession - Apple Inc. · 2016. 7. 8. · NSURLSession API for downloading HTTP content Rich set of delegate methods Background download/upload capability

HTTP/1.1 HTTP/2

Multiple TCP connections to a host Only one TCP connection

Page 58: Networking with NSURLSession - Apple Inc. · 2016. 7. 8. · NSURLSession API for downloading HTTP content Rich set of delegate methods Background download/upload capability

HTTP/1.1 HTTP/2

Multiple TCP connections to a host Only one TCP connection

Head-of-line blocking Fully multiplexed

Page 59: Networking with NSURLSession - Apple Inc. · 2016. 7. 8. · NSURLSession API for downloading HTTP content Rich set of delegate methods Background download/upload capability

HTTP/1.1 HTTP/2

Multiple TCP connections to a host Only one TCP connection

Head-of-line blocking Fully multiplexed

FIFO restrictions Requests have priorities

Page 60: Networking with NSURLSession - Apple Inc. · 2016. 7. 8. · NSURLSession API for downloading HTTP content Rich set of delegate methods Background download/upload capability

HTTP/2 - MultiplexingSolution for Head-of-Line Blocking problem

Time

HTTP/1.1: Head-of-Line Blocking

HTTP/2: Multiplexing

Priority LegendLow

Medium

High

(without Pipelining)

Page 61: Networking with NSURLSession - Apple Inc. · 2016. 7. 8. · NSURLSession API for downloading HTTP content Rich set of delegate methods Background download/upload capability

HTTP/2 - MultiplexingSolution for Head-of-Line Blocking problem

Time

HTTP/1.1: Head-of-Line Blocking

HTTP/2: Multiplexing

Priority LegendLow

Medium

High

image.jpg

styles.css

data.xml

(without Pipelining)

Page 62: Networking with NSURLSession - Apple Inc. · 2016. 7. 8. · NSURLSession API for downloading HTTP content Rich set of delegate methods Background download/upload capability

HTTP/2 - MultiplexingSolution for Head-of-Line Blocking problem

Time

HTTP/1.1: Head-of-Line Blocking

HTTP/2: Multiplexing

Priority LegendLow

Medium

High

image.jpg

styles.css

data.xml

GET

(without Pipelining)

Page 63: Networking with NSURLSession - Apple Inc. · 2016. 7. 8. · NSURLSession API for downloading HTTP content Rich set of delegate methods Background download/upload capability

200 OK

HTTP/2 - MultiplexingSolution for Head-of-Line Blocking problem

Time

HTTP/1.1: Head-of-Line Blocking

HTTP/2: Multiplexing

Priority LegendLow

Medium

High

image.jpg

styles.css

data.xml

✔GET

(without Pipelining)

Page 64: Networking with NSURLSession - Apple Inc. · 2016. 7. 8. · NSURLSession API for downloading HTTP content Rich set of delegate methods Background download/upload capability

HTTP/2 - MultiplexingSolution for Head-of-Line Blocking problem

Time

HTTP/1.1: Head-of-Line Blocking

HTTP/2: Multiplexing

Priority LegendLow

Medium

High

image.jpg

styles.css

data.xml

(without Pipelining)

Page 65: Networking with NSURLSession - Apple Inc. · 2016. 7. 8. · NSURLSession API for downloading HTTP content Rich set of delegate methods Background download/upload capability

HTTP/2 - MultiplexingSolution for Head-of-Line Blocking problem

Time

HTTP/1.1: Head-of-Line Blocking

HTTP/2: Multiplexing

Priority LegendLow

Medium

High

image.jpg

styles.css

data.xml

(without Pipelining)

Page 66: Networking with NSURLSession - Apple Inc. · 2016. 7. 8. · NSURLSession API for downloading HTTP content Rich set of delegate methods Background download/upload capability

HTTP/2 - MultiplexingSolution for Head-of-Line Blocking problem

Time

HTTP/1.1: Head-of-Line Blocking

HTTP/2: Multiplexing

image.jpg

styles.css

data.xml

(without Pipelining)

Priority LegendLow

Medium

High

Page 67: Networking with NSURLSession - Apple Inc. · 2016. 7. 8. · NSURLSession API for downloading HTTP content Rich set of delegate methods Background download/upload capability

HTTP/2 - MultiplexingSolution for Head-of-Line Blocking problem

Time

HTTP/1.1: Head-of-Line Blocking

HTTP/2: Multiplexing

image.jpg

styles.css

data.xml

(with Pipelining)

Priority LegendLow

Medium

High

Page 68: Networking with NSURLSession - Apple Inc. · 2016. 7. 8. · NSURLSession API for downloading HTTP content Rich set of delegate methods Background download/upload capability

HTTP/2 - MultiplexingSolution for Head-of-Line Blocking problem

Time

HTTP/2: Multiplexing

image.jpg

styles.css

data.xml

HTTP/1.1: Head-of-Line Blocking (with Pipelining)

Priority LegendLow

Medium

High

Page 69: Networking with NSURLSession - Apple Inc. · 2016. 7. 8. · NSURLSession API for downloading HTTP content Rich set of delegate methods Background download/upload capability

HTTP/2 - MultiplexingSolution for Head-of-Line Blocking problem

Time

HTTP/2: Multiplexing

image.jpg

styles.css

data.xml

image.jpg

styles.css

data.xml

HTTP/1.1: Head-of-Line Blocking (with Pipelining)

Priority LegendLow

Medium

High

Page 70: Networking with NSURLSession - Apple Inc. · 2016. 7. 8. · NSURLSession API for downloading HTTP content Rich set of delegate methods Background download/upload capability

HTTP/2 - MultiplexingSolution for Head-of-Line Blocking problem

Time

HTTP/2: Multiplexing

image.jpg

styles.css

data.xml

image.jpg

styles.css

data.xml

HTTP/1.1: Head-of-Line Blocking (with Pipelining)

Priority LegendLow

Medium

High

Page 71: Networking with NSURLSession - Apple Inc. · 2016. 7. 8. · NSURLSession API for downloading HTTP content Rich set of delegate methods Background download/upload capability

HTTP/2 - MultiplexingSolution for Head-of-Line Blocking problem

Time

HTTP/2: Multiplexing

image.jpg

styles.css

data.xml

image.jpg

styles.css

data.xml

HTTP/1.1: Head-of-Line Blocking (with Pipelining)

Priority LegendLow

Medium

High

Page 72: Networking with NSURLSession - Apple Inc. · 2016. 7. 8. · NSURLSession API for downloading HTTP content Rich set of delegate methods Background download/upload capability

HTTP/2 - MultiplexingSolution for Head-of-Line Blocking problem

Time

HTTP/2: Multiplexing

image.jpg

styles.css

data.xml

image.jpg

styles.css

data.xml

HTTP/1.1: Head-of-Line Blocking (with Pipelining)

Priority LegendLow

Medium

High

Page 73: Networking with NSURLSession - Apple Inc. · 2016. 7. 8. · NSURLSession API for downloading HTTP content Rich set of delegate methods Background download/upload capability

HTTP/2 - MultiplexingSolution for Head-of-Line Blocking problem

Time

HTTP/2: Multiplexing

image.jpg

styles.css

data.xml

image.jpg

styles.css

data.xml

HTTP/1.1: Head-of-Line Blocking

(with Pipelining)

Priority LegendLow

Medium

High

Page 74: Networking with NSURLSession - Apple Inc. · 2016. 7. 8. · NSURLSession API for downloading HTTP content Rich set of delegate methods Background download/upload capability

HTTP/1.1 HTTP/2

Multiple TCP connections to a host Only one TCP connection

Head-of-line blocking Fully multiplexed

FIFO restrictions Requests have priorities

Page 75: Networking with NSURLSession - Apple Inc. · 2016. 7. 8. · NSURLSession API for downloading HTTP content Rich set of delegate methods Background download/upload capability

HTTP/1.1 HTTP/2

Multiple TCP connections to a host Only one TCP connection

Head-of-line blocking Fully multiplexed

FIFO restrictions Requests have priorities

Textual protocol overhead Binary

Page 76: Networking with NSURLSession - Apple Inc. · 2016. 7. 8. · NSURLSession API for downloading HTTP content Rich set of delegate methods Background download/upload capability

HTTP/1.1 HTTP/2

Multiple TCP connections to a host Only one TCP connection

Head-of-line blocking Fully multiplexed

FIFO restrictions Requests have priorities

Textual protocol overhead Binary

No header compression Header compression (HPACK)

Page 77: Networking with NSURLSession - Apple Inc. · 2016. 7. 8. · NSURLSession API for downloading HTTP content Rich set of delegate methods Background download/upload capability

Index Header Name Header Value-

HTTP/2 Header Compression

Index Header Name Header Value1 :authority2 :method GET3 :method POST4 :path /5 :path /index.html6 :scheme http7 :scheme https8 :status 200

… …14 :status 50015 accept-charset16 accept-encoding gzip, deflate17 accept-language… …57 transfer-encoding58 user-agent59 vary60 via61 www-authenticate

HPACK Static Table Dynamic Table

Page 78: Networking with NSURLSession - Apple Inc. · 2016. 7. 8. · NSURLSession API for downloading HTTP content Rich set of delegate methods Background download/upload capability

Index Header Name Header Value-

HTTP/2 Header CompressionHPACK Static Table

Index Header Name Header Value1 :authority2 :method GET3 :method POST4 :path /5 :path /index.html6 :scheme http7 :scheme https8 :status 200

… …14 :status 50015 accept-charset16 accept-encoding gzip, deflate17 accept-language… …57 transfer-encoding58 user-agent59 vary60 via61 www-authenticate

Dynamic Table

Page 79: Networking with NSURLSession - Apple Inc. · 2016. 7. 8. · NSURLSession API for downloading HTTP content Rich set of delegate methods Background download/upload capability

Index Header Name Header Value-

HTTP/2 Header CompressionHPACK Static Table

Index Header Name Header Value1 :authority2 :method GET3 :method POST4 :path /5 :path /index.html6 :scheme http7 :scheme https8 :status 200

… …14 :status 50015 accept-charset16 accept-encoding gzip, deflate17 accept-language… …57 transfer-encoding58 user-agent59 vary60 via61 www-authenticate

Dynamic Table

GET / HTTP/1.1\r\n Host: www.example.com\r\n Connection: Keep-Alive\r\n\r\n

HTTP/1.1 Request:

Page 80: Networking with NSURLSession - Apple Inc. · 2016. 7. 8. · NSURLSession API for downloading HTTP content Rich set of delegate methods Background download/upload capability

Index Header Name Header Value-

HTTP/2 Header CompressionHPACK Static Table

Index Header Name Header Value1 :authority2 :method GET3 :method POST4 :path /5 :path /index.html6 :scheme http7 :scheme https8 :status 200

… …14 :status 50015 accept-charset16 accept-encoding gzip, deflate17 accept-language… …57 transfer-encoding58 user-agent59 vary60 via61 www-authenticate

Dynamic Table

:method: GET :scheme: https :path: / :authority: www.example.com

HTTP/2 Representation:

GET / HTTP/1.1\r\n Host: www.example.com\r\n Connection: Keep-Alive\r\n\r\n

HTTP/1.1 Request:

Page 81: Networking with NSURLSession - Apple Inc. · 2016. 7. 8. · NSURLSession API for downloading HTTP content Rich set of delegate methods Background download/upload capability

Index Header Name Header Value-

HTTP/2 Header CompressionHPACK Static Table

Index Header Name Header Value1 :authority2 :method GET3 :method POST4 :path /5 :path /index.html6 :scheme http7 :scheme https8 :status 200

… …14 :status 50015 accept-charset16 accept-encoding gzip, deflate17 accept-language… …57 transfer-encoding58 user-agent59 vary60 via61 www-authenticate

Dynamic Table

:method: GET :scheme: https :path: / :authority: www.example.com

HTTP/2 Representation:

GET / HTTP/1.1\r\n Host: www.example.com\r\n Connection: Keep-Alive\r\n\r\n

HTTP/1.1 Request:

Page 82: Networking with NSURLSession - Apple Inc. · 2016. 7. 8. · NSURLSession API for downloading HTTP content Rich set of delegate methods Background download/upload capability

Index Header Name Header Value-

HTTP/2 Header CompressionHPACK Static Table

Index Header Name Header Value1 :authority2 :method GET3 :method POST4 :path /5 :path /index.html6 :scheme http7 :scheme https8 :status 200

… …14 :status 50015 accept-charset16 accept-encoding gzip, deflate17 accept-language… …57 transfer-encoding58 user-agent59 vary60 via61 www-authenticate

Dynamic Table

:method: GET :scheme: https :path: / :authority: www.example.com

HTTP/2 Representation:

GET / HTTP/1.1\r\n Host: www.example.com\r\n Connection: Keep-Alive\r\n\r\n

HTTP/1.1 Request:

Page 83: Networking with NSURLSession - Apple Inc. · 2016. 7. 8. · NSURLSession API for downloading HTTP content Rich set of delegate methods Background download/upload capability

Index Header Name Header Value-

HTTP/2 Header CompressionHPACK Static Table

Index Header Name Header Value1 :authority2 :method GET3 :method POST4 :path /5 :path /index.html6 :scheme http7 :scheme https8 :status 200

… …14 :status 50015 accept-charset16 accept-encoding gzip, deflate17 accept-language… …57 transfer-encoding58 user-agent59 vary60 via61 www-authenticate

Dynamic Table

:method: GET :scheme: https :path: / :authority: www.example.com

HTTP/2 Representation:

GET / HTTP/1.1\r\n Host: www.example.com\r\n Connection: Keep-Alive\r\n\r\n

HTTP/1.1 Request:

Page 84: Networking with NSURLSession - Apple Inc. · 2016. 7. 8. · NSURLSession API for downloading HTTP content Rich set of delegate methods Background download/upload capability

Index Header Name Header Value-

HTTP/2 Header CompressionHPACK Static Table

Index Header Name Header Value1 :authority2 :method GET3 :method POST4 :path /5 :path /index.html6 :scheme http7 :scheme https8 :status 200

… …14 :status 50015 accept-charset16 accept-encoding gzip, deflate17 accept-language… …57 transfer-encoding58 user-agent59 vary60 via61 www-authenticate

Dynamic Table

:method: GET :scheme: https :path: / :authority: www.example.com

HTTP/2 Representation:

GET / HTTP/1.1\r\n Host: www.example.com\r\n Connection: Keep-Alive\r\n\r\n

HTTP/1.1 Request:

Page 85: Networking with NSURLSession - Apple Inc. · 2016. 7. 8. · NSURLSession API for downloading HTTP content Rich set of delegate methods Background download/upload capability

Index Header Name Header Value-

HTTP/2 Header Compression

Index Header Name Header Value1 :authority2 :method GET3 :method POST4 :path /5 :path /index.html6 :scheme http7 :scheme https8 :status 200

… …14 :status 50015 accept-charset16 accept-encoding gzip, deflate17 accept-language… …57 transfer-encoding58 user-agent59 vary60 via61 www-authenticate

:method: GET :scheme: https :path: / :authority: www.example.com

HTTP/2 Representation:

GET / HTTP/1.1\r\n Host: www.example.com\r\n Connection: Keep-Alive\r\n\r\n

HTTP/1.1 Request:

HPACK Static Table Dynamic Table

Page 86: Networking with NSURLSession - Apple Inc. · 2016. 7. 8. · NSURLSession API for downloading HTTP content Rich set of delegate methods Background download/upload capability

Index Header Name Header Value-

HTTP/2 Header Compression

Index Header Name Header Value1 :authority2 :method GET3 :method POST4 :path /5 :path /index.html6 :scheme http7 :scheme https8 :status 200

… …14 :status 50015 accept-charset16 accept-encoding gzip, deflate17 accept-language… …57 transfer-encoding58 user-agent59 vary60 via61 www-authenticate

:method: GET :scheme: https :path: / :authority: www.example.com

HTTP/2 Representation:

GET / HTTP/1.1\r\n Host: www.example.com\r\n Connection: Keep-Alive\r\n\r\n

HTTP/1.1 Request:

www.example.com

HPACK Static Table Dynamic Table

Page 87: Networking with NSURLSession - Apple Inc. · 2016. 7. 8. · NSURLSession API for downloading HTTP content Rich set of delegate methods Background download/upload capability

Index Header Name Header Value1 :authority www.example.com

HTTP/2 Header Compression

Index Header Name Header Value1 :authority2 :method GET3 :method POST4 :path /5 :path /index.html6 :scheme http7 :scheme https8 :status 200

… …14 :status 50015 accept-charset16 accept-encoding gzip, deflate17 accept-language… …57 transfer-encoding58 user-agent59 vary60 via61 www-authenticate

HPACK Static Table Dynamic Table

Page 88: Networking with NSURLSession - Apple Inc. · 2016. 7. 8. · NSURLSession API for downloading HTTP content Rich set of delegate methods Background download/upload capability

Index Header Name Header Value1 :authority www.example.com

HTTP/2 Header Compression

Index Header Name Header Value1 :authority2 :method GET3 :method POST4 :path /5 :path /index.html6 :scheme http7 :scheme https8 :status 200

… …14 :status 50015 accept-charset16 accept-encoding gzip, deflate17 accept-language… …57 transfer-encoding58 user-agent59 vary60 via61 www-authenticate

HPACK Static Table Dynamic Table

Page 89: Networking with NSURLSession - Apple Inc. · 2016. 7. 8. · NSURLSession API for downloading HTTP content Rich set of delegate methods Background download/upload capability

Index Header Name Header Value1 :authority www.example.com

HTTP/2 Header Compression

Index Header Name Header Value1 :authority2 :method GET3 :method POST4 :path /5 :path /index.html6 :scheme http7 :scheme https8 :status 200

… …14 :status 50015 accept-charset16 accept-encoding gzip, deflate17 accept-language… …57 transfer-encoding58 user-agent59 vary60 via61 www-authenticate

GET /index.html HTTP/1.1\r\n Host: www.example.com\r\n Connection: Keep-Alive\r\n\r\n

HTTP/1.1 Second request:

HPACK Static Table Dynamic Table

Page 90: Networking with NSURLSession - Apple Inc. · 2016. 7. 8. · NSURLSession API for downloading HTTP content Rich set of delegate methods Background download/upload capability

Index Header Name Header Value1 :authority www.example.com

HTTP/2 Header Compression

Index Header Name Header Value1 :authority2 :method GET3 :method POST4 :path /5 :path /index.html6 :scheme http7 :scheme https8 :status 200

… …14 :status 50015 accept-charset16 accept-encoding gzip, deflate17 accept-language… …57 transfer-encoding58 user-agent59 vary60 via61 www-authenticate

GET /index.html HTTP/1.1\r\n Host: www.example.com\r\n Connection: Keep-Alive\r\n\r\n

HTTP/1.1 Second request:

HTTP/2 Second request::method: GET :scheme: https :path: /index.html :authority: www.example.com

HPACK Static Table Dynamic Table

Page 91: Networking with NSURLSession - Apple Inc. · 2016. 7. 8. · NSURLSession API for downloading HTTP content Rich set of delegate methods Background download/upload capability

Index Header Name Header Value1 :authority www.example.com

HTTP/2 Header Compression

Index Header Name Header Value1 :authority2 :method GET3 :method POST4 :path /5 :path /index.html6 :scheme http7 :scheme https8 :status 200

… …14 :status 50015 accept-charset16 accept-encoding gzip, deflate17 accept-language… …57 transfer-encoding58 user-agent59 vary60 via61 www-authenticate

GET /index.html HTTP/1.1\r\n Host: www.example.com\r\n Connection: Keep-Alive\r\n\r\n

HTTP/1.1 Second request:

HTTP/2 Second request:☐☐☐☐

HPACK Static Table Dynamic Table

Page 92: Networking with NSURLSession - Apple Inc. · 2016. 7. 8. · NSURLSession API for downloading HTTP content Rich set of delegate methods Background download/upload capability

HTTP/2 Adoption on the client

Page 93: Networking with NSURLSession - Apple Inc. · 2016. 7. 8. · NSURLSession API for downloading HTTP content Rich set of delegate methods Background download/upload capability

NSURLSession supports HTTP/2 protocol automatically

HTTP/2 Adoption on the client

Page 94: Networking with NSURLSession - Apple Inc. · 2016. 7. 8. · NSURLSession API for downloading HTTP content Rich set of delegate methods Background download/upload capability

NSURLSession supports HTTP/2 protocol automaticallyNo source code changes needed

HTTP/2 Adoption on the client

Page 95: Networking with NSURLSession - Apple Inc. · 2016. 7. 8. · NSURLSession API for downloading HTTP content Rich set of delegate methods Background download/upload capability

NSURLSession supports HTTP/2 protocol automaticallyNo source code changes needed

HTTP/2 Adoption on the client

let sessionConfig = NSURLSessionConfiguration.defaultSessionConfiguration() let session = NSURLSession(configuration: sessionConfig)

let url = NSURL(string: "https://www.example.com")! let task = session.dataTaskWithURL(url) { (data: NSData?, response: NSURLResponse?, error: NSError?) in ... }

task?.resume()

Page 96: Networking with NSURLSession - Apple Inc. · 2016. 7. 8. · NSURLSession API for downloading HTTP content Rich set of delegate methods Background download/upload capability

You Only Need an HTTP/2 Server

Page 97: Networking with NSURLSession - Apple Inc. · 2016. 7. 8. · NSURLSession API for downloading HTTP content Rich set of delegate methods Background download/upload capability

HTTP/2 in NSURLSessionCompatibility

Backward compatible with HTTP/1.1 serversEncrypted connection onlyHTTP/2 server requires ALPN or NPN support

Page 98: Networking with NSURLSession - Apple Inc. · 2016. 7. 8. · NSURLSession API for downloading HTTP content Rich set of delegate methods Background download/upload capability

HTTP/2 TodayCurrent adoption

HomeKit Remote Access via iCloudServices provided by Google and TwitterOpen source web serversContent Delivery Network providers

Page 99: Networking with NSURLSession - Apple Inc. · 2016. 7. 8. · NSURLSession API for downloading HTTP content Rich set of delegate methods Background download/upload capability

HTTP/2At a glance

HTTP/2 is available in WWDC seed todayAvailable in NSURLSessionEnabled in Safari on OS X 10.11 and iOS 9

Page 100: Networking with NSURLSession - Apple Inc. · 2016. 7. 8. · NSURLSession API for downloading HTTP content Rich set of delegate methods Background download/upload capability

NSURLSession on watchOS

Dan VinegradSoftware Engineer

Page 101: Networking with NSURLSession - Apple Inc. · 2016. 7. 8. · NSURLSession API for downloading HTTP content Rich set of delegate methods Background download/upload capability

NSURLSession on watchOS

Fully supported for HTTP(S)Uses best available connectivity (iPhone or WiFi)

Page 102: Networking with NSURLSession - Apple Inc. · 2016. 7. 8. · NSURLSession API for downloading HTTP content Rich set of delegate methods Background download/upload capability

NSURLSession on watchOS

Fully supported for HTTP(S)Uses best available connectivity (iPhone or WiFi)It’s Magic

Page 103: Networking with NSURLSession - Apple Inc. · 2016. 7. 8. · NSURLSession API for downloading HTTP content Rich set of delegate methods Background download/upload capability

NSURLSession on watchOSBest practices

Page 104: Networking with NSURLSession - Apple Inc. · 2016. 7. 8. · NSURLSession API for downloading HTTP content Rich set of delegate methods Background download/upload capability

NSURLSession on watchOSBest practices

Download the minimal assets required• Small screen• Limited bandwidth

Page 105: Networking with NSURLSession - Apple Inc. · 2016. 7. 8. · NSURLSession API for downloading HTTP content Rich set of delegate methods Background download/upload capability

NSURLSession on watchOSBest practices

Download the minimal assets required• Small screen• Limited bandwidth

Apps will only run for a very short time• Send small amounts of data• Use background uploads/downloads for larger content

Page 106: Networking with NSURLSession - Apple Inc. · 2016. 7. 8. · NSURLSession API for downloading HTTP content Rich set of delegate methods Background download/upload capability

API Changes

Page 107: Networking with NSURLSession - Apple Inc. · 2016. 7. 8. · NSURLSession API for downloading HTTP content Rich set of delegate methods Background download/upload capability

NSURLConnection

Page 108: Networking with NSURLSession - Apple Inc. · 2016. 7. 8. · NSURLSession API for downloading HTTP content Rich set of delegate methods Background download/upload capability

NSURLConnection

Deprecated in OS X 10.11 and iOS 9.0• Not going away, apps using it will still work• New features will be added to NSURLSession

Not supported on watchOSSwitching to NSURLSession is easy

Page 109: Networking with NSURLSession - Apple Inc. · 2016. 7. 8. · NSURLSession API for downloading HTTP content Rich set of delegate methods Background download/upload capability

Switching to NSURLSession

let queue: NSOperationQueue = ... let url = NSURL(string: "https://www.example.com")! let request = NSURLRequest(URL: url)

NSURLConnection.sendAsynchronousRequest(request, queue: queue) { (response: NSURLResponse?, data: NSData?, error: NSError?) in ... }

Page 110: Networking with NSURLSession - Apple Inc. · 2016. 7. 8. · NSURLSession API for downloading HTTP content Rich set of delegate methods Background download/upload capability

Switching to NSURLSession

let queue: NSOperationQueue = ... let url = NSURL(string: "https://www.example.com")! let request = NSURLRequest(URL: url)

NSURLConnection.sendAsynchronousRequest(request, queue: queue) { (response: NSURLResponse?, data: NSData?, error: NSError?) in ... }

let task = NSURLSession.sharedSession().dataTaskWithRequest(request) { (data: NSData?, response: NSURLResponse?, error: NSError?) in

... } task?.resume()

Page 111: Networking with NSURLSession - Apple Inc. · 2016. 7. 8. · NSURLSession API for downloading HTTP content Rich set of delegate methods Background download/upload capability

New NSURLSession API

Page 112: Networking with NSURLSession - Apple Inc. · 2016. 7. 8. · NSURLSession API for downloading HTTP content Rich set of delegate methods Background download/upload capability

Sharing CookiesBetween Apps and Extensions

Apps and their extensions have different cookie storages by defaultCan use application groups to get a shared data containerOS X 10.11 and iOS 9 introduce new API to create a shared cookie storage

Page 113: Networking with NSURLSession - Apple Inc. · 2016. 7. 8. · NSURLSession API for downloading HTTP content Rich set of delegate methods Background download/upload capability

New NSHTTPCookieStorage API

let ident = "group.mycompany.mygroupname" let cookieStorage = NSHTTPCookieStorage.sharedCookieStorageForGroupContainerIdentifier( identifier: ident)

let config = NSURLSessionConfiguration.defaultSessionConfiguration() config.HTTPCookieStorage = cookieStorage let session = NSURLSession(configuration: config)

Page 114: Networking with NSURLSession - Apple Inc. · 2016. 7. 8. · NSURLSession API for downloading HTTP content Rich set of delegate methods Background download/upload capability

NSURLSessionStreamTaskTCP/IP networking

Page 115: Networking with NSURLSession - Apple Inc. · 2016. 7. 8. · NSURLSession API for downloading HTTP content Rich set of delegate methods Background download/upload capability

NSURLSessionStreamTaskTCP/IP networking

Sometimes need a protocol other than HTTP(S)

Page 116: Networking with NSURLSession - Apple Inc. · 2016. 7. 8. · NSURLSession API for downloading HTTP content Rich set of delegate methods Background download/upload capability

NSURLSessionStreamTaskTCP/IP networking

Sometimes need a protocol other than HTTP(S)Advantages over NSInputStream / NSOutputStream• Asynchronous read/write interface• Can automatically get through HTTP proxies• New API goodies

Page 117: Networking with NSURLSession - Apple Inc. · 2016. 7. 8. · NSURLSession API for downloading HTTP content Rich set of delegate methods Background download/upload capability

NSURLSessionStreamTaskTCP/IP networking

Sometimes need a protocol other than HTTP(S)Advantages over NSInputStream / NSOutputStream• Asynchronous read/write interface• Can automatically get through HTTP proxies• New API goodies

Legacy NSStream support

Page 118: Networking with NSURLSession - Apple Inc. · 2016. 7. 8. · NSURLSession API for downloading HTTP content Rich set of delegate methods Background download/upload capability

NSURLSessionStreamTaskTCP/IP networking

Page 119: Networking with NSURLSession - Apple Inc. · 2016. 7. 8. · NSURLSession API for downloading HTTP content Rich set of delegate methods Background download/upload capability

NSURLSessionStreamTaskTCP/IP networking

Supports TCP/IP connections:• Hostname and port• NSNetService resolution

Page 120: Networking with NSURLSession - Apple Inc. · 2016. 7. 8. · NSURLSession API for downloading HTTP content Rich set of delegate methods Background download/upload capability

NSURLSessionStreamTaskTCP/IP networking

Supports TCP/IP connections:• Hostname and port• NSNetService resolution

Uses existing NSURLSession configuration and session delegates

Page 121: Networking with NSURLSession - Apple Inc. · 2016. 7. 8. · NSURLSession API for downloading HTTP content Rich set of delegate methods Background download/upload capability

NSURLSessionStreamTaskTCP/IP networking

Supports TCP/IP connections:• Hostname and port• NSNetService resolution

Uses existing NSURLSession configuration and session delegatesSecure TLS connections supported• Even after connected!

Page 122: Networking with NSURLSession - Apple Inc. · 2016. 7. 8. · NSURLSession API for downloading HTTP content Rich set of delegate methods Background download/upload capability

NSURLSessionStreamTaskAsynchronous read

let task = NSURLSession.sharedSession().streamTaskWithHostName("chat.example.com",

port: 5555)! task.resume() task.readDataOfMinLength(16384, maxLength:65536, timeout: 30.0) { (data: NSData?, eof: Bool, error: NSError?) in ... }

Page 123: Networking with NSURLSession - Apple Inc. · 2016. 7. 8. · NSURLSession API for downloading HTTP content Rich set of delegate methods Background download/upload capability

NSURLSessionStreamTaskAsynchronous write

let task = NSURLSession.sharedSession().streamTaskWithHostName("chat.example.com",

port: 5555)! task.resume() let data: NSData = ... task.writeData(data, timeout: 30.0) { (error: NSError?) in ... }

Page 124: Networking with NSURLSession - Apple Inc. · 2016. 7. 8. · NSURLSession API for downloading HTTP content Rich set of delegate methods Background download/upload capability

NSURLSessionStreamTaskEnabling TLS

let task = NSURLSession.sharedSession().streamTaskWithHostName("chat.example.com",

port: 5555)! task.startSecureConnection() task.resume() let data: NSData = ... task.writeData(data, timeout: 30.0) { (error: NSError?) in ... }

Page 125: Networking with NSURLSession - Apple Inc. · 2016. 7. 8. · NSURLSession API for downloading HTTP content Rich set of delegate methods Background download/upload capability

NSURLSessionStreamTaskConversion to NSStreams

Page 126: Networking with NSURLSession - Apple Inc. · 2016. 7. 8. · NSURLSession API for downloading HTTP content Rich set of delegate methods Background download/upload capability

NSURLSessionStreamTaskConversion to NSStreams

Some existing APIs consume NSStream objects

Page 127: Networking with NSURLSession - Apple Inc. · 2016. 7. 8. · NSURLSession API for downloading HTTP content Rich set of delegate methods Background download/upload capability

NSURLSessionStreamTaskConversion to NSStreams

Some existing APIs consume NSStream objectsPending reads/writes complete before NSStreams are produced

Page 128: Networking with NSURLSession - Apple Inc. · 2016. 7. 8. · NSURLSession API for downloading HTTP content Rich set of delegate methods Background download/upload capability

NSURLSessionStreamTaskConversion to NSStreams

Some existing APIs consume NSStream objectsPending reads/writes complete before NSStreams are producedDetaches the task from the session

Page 129: Networking with NSURLSession - Apple Inc. · 2016. 7. 8. · NSURLSession API for downloading HTTP content Rich set of delegate methods Background download/upload capability

NSURLSessionStreamTaskNSStream support

let streamTask: NSURLSessionStreamTask = …

streamTask.captureStreams()

Page 130: Networking with NSURLSession - Apple Inc. · 2016. 7. 8. · NSURLSession API for downloading HTTP content Rich set of delegate methods Background download/upload capability

NSURLSessionStreamTaskNSStream support

func URLSession(session: NSURLSession,streamTask: NSURLSessionStreamTask, didBecomeInputStream inputStream: NSInputStream, outputStream: NSOutputStream) {

// Can pass inputStream / outputStream to APIs that consume NSStreams

}

Page 131: Networking with NSURLSession - Apple Inc. · 2016. 7. 8. · NSURLSession API for downloading HTTP content Rich set of delegate methods Background download/upload capability

NSURLSessionStreamTaskOther (informational) delegate methods

optional func URLSession(session: NSURLSession, betterRouteDiscoveredForStreamTaskstreamTask: NSURLSessionStreamTask)

Page 132: Networking with NSURLSession - Apple Inc. · 2016. 7. 8. · NSURLSession API for downloading HTTP content Rich set of delegate methods Background download/upload capability

NSURLSessionStreamTaskOther (informational) delegate methods

optional func URLSession(session: NSURLSession, betterRouteDiscoveredForStreamTask streamTask: NSURLSessionStreamTask)

optional func URLSession(session: NSURLSession, readClosedForStreamTask streamTask: NSURLSessionStreamTask)

optional func URLSession(session: NSURLSession, writeClosedForStreamTask streamTask: NSURLSessionStreamTask)

Page 133: Networking with NSURLSession - Apple Inc. · 2016. 7. 8. · NSURLSession API for downloading HTTP content Rich set of delegate methods Background download/upload capability

NSURLSessionStreamTaskDataTask conversion

Page 134: Networking with NSURLSession - Apple Inc. · 2016. 7. 8. · NSURLSession API for downloading HTTP content Rich set of delegate methods Background download/upload capability

NSURLSessionStreamTaskDataTask conversion

NSURLSessionDataTask may be converted to a stream task• Use NSURLSession to get through HTTP proxies

Page 135: Networking with NSURLSession - Apple Inc. · 2016. 7. 8. · NSURLSession API for downloading HTTP content Rich set of delegate methods Background download/upload capability

NSURLSessionStreamTaskDataTask conversion

NSURLSessionDataTask may be converted to a stream task• Use NSURLSession to get through HTTP proxies

Conversion can occur when response is received

Page 136: Networking with NSURLSession - Apple Inc. · 2016. 7. 8. · NSURLSession API for downloading HTTP content Rich set of delegate methods Background download/upload capability

NSURLSessionStreamTaskDataTask conversion

func URLSession(session: NSURLSession, dataTask: NSURLSessionDataTask, didReceiveResponse response: NSURLResponse, completionHandler: (NSURLSessionResponseDisposition) -> Void) {

completionHandler(.BecomeStream) }

func URLSession(session: NSURLSession, dataTask: NSURLSessionDataTask, didBecomeStreamTask streamTask: NSURLSessionStreamTask) {

}

Page 137: Networking with NSURLSession - Apple Inc. · 2016. 7. 8. · NSURLSession API for downloading HTTP content Rich set of delegate methods Background download/upload capability

Summary

App Transport SecurityHTTP/2 support in NSURLSessionNSURLSession on watchOSNSURLConnection deprecationNew API• Group container cookie storages• NSURLSessionStreamTask

Page 138: Networking with NSURLSession - Apple Inc. · 2016. 7. 8. · NSURLSession API for downloading HTTP content Rich set of delegate methods Background download/upload capability

More Information

DocumentationDeveloper Resourceshttps://developer.apple.com

Technical SupportApple Developer Forumshttp://devforums.apple.com

Developer Technical Supporthttp://developer.apple.com/support/technical

General InquiriesPaul Danbold, Core OS [email protected]

Page 139: Networking with NSURLSession - Apple Inc. · 2016. 7. 8. · NSURLSession API for downloading HTTP content Rich set of delegate methods Background download/upload capability

Related Sessions

Security and Your Apps Mission Tuesday 4:30PM

Introducing Watch Connectivity Pacific Heights Thursday 11:00AM

Your App and Next Generation Networks Mission Friday 11:00AM

Page 140: Networking with NSURLSession - Apple Inc. · 2016. 7. 8. · NSURLSession API for downloading HTTP content Rich set of delegate methods Background download/upload capability

Related Labs

Networking Lab Frameworks Lab E Thursday 10:00AM

Networking Lab Frameworks Lab B Friday 1:30PM

Page 141: Networking with NSURLSession - Apple Inc. · 2016. 7. 8. · NSURLSession API for downloading HTTP content Rich set of delegate methods Background download/upload capability