Streaming is available in most browsers,
and in the WWDC app.
-
Advances in Networking, Part 2
Learn about important improvements to URLSession. Find out how to use new URLSession APIs to better handle connectivity fluctuations, to schedule background session tasks, and to receive progress reports for session tasks. Plus, gain insights into valuable best practices, tips, and news about ongoing work with emerging network technologies.
Resources
- Network Extension
- Supporting IPv6 DNS64/NAT64 Networks
- Technical Q&A; QA1941
- URLSession
- URLSession Programming Guide
- URLSessionConfiguration
- Presentation Slides (PDF)
Related Videos
WWDC 2017
- Advances in Networking, Part 1
- Build Better Apps with CloudKit Dashboard
- Writing Energy Efficient Apps
- Your Apps and Evolving Network Security Standards
Tech Talks
WWDC 2016
WWDC 2015
-
Download
Jeff Tu: Good afternoon, everyone. I'd like to welcome to you part two to Advances in Networking, a continuation of the session from the past hour.
My name is Jeff Tu, and I'll be taking you through the first topic.
In this session we'll discuss new URLSession developer API and enhancements, networking best practices, and other important technology areas in networking.
Our first topic is new URLSession API.
But before that, I'd like to review the underlying API we'll be talking about, which is URLSession.
URLSession is an easy-to-use API for networking introduced in iOS 7 and OS X Mavericks.
URLSession supports networking protocols like HTTP/2; HTTP/1.1; FTP; and custom streams with an overall emphasis on URL loading.
If you provide it an HTTPS URL, it also automatically provides the encryption and decryption of data between you and the web server.
Last year we deprecated NSURLConnection API. So we encourage any new app development to occur with URLSession.
For more information on URLSession, I encourage you to review past WWDC sessions and other online documentation.
Recall that there are different kinds of URLSession objects that you can create.
The basic object you can create is a default configuration URLSession object.
Default sessions have a behavior where a task either fetches a URL immediately; or if the device can't connect to the web server, fails immediately.
URL loads can fail because the device isn't connected to the Internet or if the server you're trying to reach happens to be down.
Those are just a couple of examples.
Background URLSession objects, on the other hand, don't have this immediate fetch or fail behavior but are scheduled out of process and continually

