Networking with URLSession
Learn how to use URLSession, Apple's networking API, including when and how to use data, download and upload tasks, with or without a custom session delegate, and how the system manages background sessions. Keep your users' data safe with authentication and App Transport Security, and pick up tips for networking architecture, testing and metrics. Updated for iOS 12 and Swift 4. By Brian Moakley.
Part 1: Getting Started
This video provides an overview of what is a URLSession, what it provides, and the requirements of what is needed to learn it.
You'll get an overview of why concurrency is important and how ignoring it can create a terrible user experience.
In this video, you'll get a brief overview of the two concurrency options in iOS and see them in action.
This challenge will put your understanding of concurrency to the test by updating the user interface from an operation queue.
Learn the basics of Session Configuration and how you can use the configuration to modify your session's behavior.
This video covers the basics of working with sessions and how to use session data tasks.
Now that you have an idea of how to create a session, your challenge is to create your own session.
This video reviews the concepts covered in this part and gives a preview for the next part.
Part 2: Data Fetching and Background Sessions
The data task is the workhorse of URLSession. This part covers a lot of cool things you can do with them.
This video shows how you can use a url request and a data task to post data across the web.
Working with tasks often means setting priorites and figuring out what to cache. This video covers what you need to know.
The upload task lets you upload data across networks. This video will get you started.
Downloading data with URLSession is quite easy to do. This video will introduce you to the download task.
Often times, you'll be fetching resources from the network, and this challenge will get you started with that.
This video covers the necessary moving parts that go into creating background sessions.
Now that you have the theory down, this video shows how background sessions work in practice.
This video reviews all the various ways to download or upload data with URLSession.
Part 3: Authentication
This video provides an overview of the various aspects of authentication which will be covered in this part of the course.
This video covers the many different authentication mechanisms available to you when connecting over networks.
When working with REST services, you'll often need an authentication token. This video will get you started.
Cookies help manage states and in this video, you'll learn how to manage cookies.
In this challenge, you'll be tasked with printing out all the values of a cookie to the console.
App Security Transport is a way to ensure secure communications across a network. This episode will get you started.
This episode reviews what was covered in this video course and lets you know where to go from here.