Networking with URLSession

Oct 9 2018 · Video Course (1 hr, 42 mins) · Beginner

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.

Version

  • Swift 4, iOS 12, Xcode 10

Getting Started

Introduction

4:16 Free

This video provides an overview of what is a URLSession, what it provides, and the requirements of what is needed to learn it.

1

You'll get an overview of why concurrency is important and how ignoring it can create a terrible user experience.

2

In this video, you'll get a brief overview of the two concurrency options in iOS and see them in action.

3

This challenge will put your understanding of concurrency to the test by updating the user interface from an operation queue.

4

Learn the basics of Session Configuration and how you can use the configuration to modify your session's behavior.

5

This video covers the basics of working with sessions and how to use session data tasks.

6

Now that you have an idea of how to create a session, your challenge is to create your own session.

7

Conclusion

1:30

This video reviews the concepts covered in this part and gives a preview for the next part.

8

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.

9

This video shows how you can use a url request and a data task to post data across the web.

10

Working with tasks often means setting priorites and figuring out what to cache. This video covers what you need to know.

11

The upload task lets you upload data across networks. This video will get you started.

12

Downloading data with URLSession is quite easy to do. This video will introduce you to the download task.

13

Often times, you'll be fetching resources from the network, and this challenge will get you started with that.

14

This video covers the necessary moving parts that go into creating background sessions.

15

Now that you have the theory down, this video shows how background sessions work in practice.

16

Conclusion

1:28

This video reviews all the various ways to download or upload data with URLSession.

17

Authentication

This video provides an overview of the various aspects of authentication which will be covered in this part of the course.

18

This video covers the many different authentication mechanisms available to you when connecting over networks.

19

When working with REST services, you'll often need an authentication token. This video will get you started.

20

Cookies help manage states and in this video, you'll learn how to manage cookies.

21

In this challenge, you'll be tasked with printing out all the values of a cookie to the console.

22

App Security Transport is a way to ensure secure communications across a network. This episode will get you started.

23

Conclusion

2:18

This episode reviews what was covered in this video course and lets you know where to go from here.

24

Contributors

Comments