Networking with URLSession [SUBSCRIBER]

栏目: IT技术 · 发布时间: 4年前

Networking with URLSession

Jun 9 2020 · Video Course (3 hrs, 23 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 and WebSockets. Leverage the Combine API and SwiftUI to take your networking to the next level. Updated for iOS 13 and Swift 5.2.

Start Watching for Free

Version

  • Swift 5.2, iOS 13, Xcode 11

Networking iOS & Swift Tutorials

Networking with URLSession [SUBSCRIBER]
Networking with URLSession [SUBSCRIBER]

Concurrency and DataTasks

Introduction

5:37 Free

Learn about the URLSession and how the framework evolved in the way that it did. Also learn about the course goals.

Get an overview of why concurrency is important and how ignoring it can create a terrible user experience.

In this episode, get a brief overview of the various 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 episode covers the basics of working with sessions and how to use session data tasks to fetch remote data.

Now that you have an idea of how to create a session, your challenge is to create your own session and fetch artwork from over the network.

Conclusion

1:56

Review the concepts covered in this part and preview the next part of the course.

Downloading and Uploading

Now that you understand the data task, learn how to put the download task and upload task to use.

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

In this episode, put the download task to use by downloading music from iTunes preview API.

Put your downloading skills to the test by downloading some album artwork and displaying it on the screen.

In this episode, learn how to display download progress as a file is downloaded.

You have lots of different tools to simulate poor network connections. This episode will show you a few of them.

This episode covers the process of pausing, canceling and resuming downloads.

Vapor is an open source server written entirely in Swift. In this episode, learn how to install the server.

Learn how to upload data to a local vapor instance.

Conclusion

1:45

This episode concludes the part on downloading and uploading, but things are just starting to get interesting

Background Downloading and WebSockets

This episode introduces the concept of background downloading and WebSocket communication.

Learn about the background task, how to use one of them and then how to handle background events.

This episode gives you an overview of BSD sockets and explains how Apple's Networking framework works for you.

Use the new WebSocket task to connect a local Vapor server to send messages and then use them to create a chat server.

Conclusion

0:52

Review all the concepts covered in this part and then learn about upcoming topics.

URLSession and Combine

Combine is a native reactive framework that released with iOS 13. Learn how URLSession has been updated to use it.

This episode provides an overview of the general concepts behind the Combine framework.

Learn how to use a data task with Combine and then how to access the data through a variety of operators.

With the use of Zip, learn how to group multiple requests together.

Learn how to make a urlrequest once another request has finished.

Put your Combine skills to the test by fetching a list of album titles and printing the results out to a list.

Learn how handle errors when something goes wrong during URLSession

Conclusion

0:49

This concludes this part on Combine but there's more to learn in the final part of this course.

Authentication, ATS and Cookies

This final part of the course covers a variety of important topics that you will need to know when making network requests.

This episode covers the various different ways to provide authentication when working with URLSession.

iOS provides some important security mechanisms when making requests on iOS. This episode shows how ATS can affect your app.

Learn how read cookies and write cookies from a URLSession

In this challenge, learn print cookies from raywenderlich.com

Conclusion

2:04

This final episode concludes the course while providing several resources on where to learn more about URLSession.

Who is this for?

Intermediate developers. You should be comfortable with the Swift programming language and up to speed on the SwiftUI framework. You should also have some working knowledge of the Combine framework.

You'll start by getting an overview of concurrency then you'll learn how to make simple network requests. Later, you'll learn how to download and upload files and how to set up background sessions. Ultimately, you'll leverage the power of the Combine framework to make your requests.

Finally, you'll learn about authentication, Apple's Transport Security and reading and writing cookies.

Covered concepts

  • URLSession Configuration
  • URLSession Connections
  • Downloading Files
  • Uploading Data
  • Pausing, Resuming and Canceling Data
  • Showing Network Progress
  • Simulating Different Network Speeds
  • Vapor Framework
  • Background Downloading
  • WebSockets
  • URLSession and Combine
  • Authentication
  • Application Transport Security
  • Cookies

Contributors

Brian Moakley

Brian is an instructor at Razeware who develops courses and screencasts on a wide variety of topics of iOS development. When...

Instructor

Marin Bencevic

Marin is a Swift and Unity developer who likes to work on cool iOS apps and games, nerd out about programming, learn new things...

Tech Editor

Christine Sweigart

Christine is Razeware's administrative assistant and video editor. For many years she fostered a strong dislike of green...

Editor

Adriana Kutenko

Graphic Illustrator with a Bachelor’s Degree in Fine Arts. I am a perpetual perfection seeker with a big passion for History...

Illustrator


以上就是本文的全部内容,希望对大家的学习有所帮助,也希望大家多多支持 码农网

查看所有标签

猜你喜欢:

本站部分资源来源于网络,本站转载出于传递更多信息之目的,版权归原作者或者来源机构所有,如转载稿涉及版权问题,请联系我们

Algorithms on Strings, Trees and Sequences

Algorithms on Strings, Trees and Sequences

Dan Gusfield / Cambridge University Press / 1997-5-28 / USD 99.99

String algorithms are a traditional area of study in computer science. In recent years their importance has grown dramatically with the huge increase of electronically stored text and of molecular seq......一起来看看 《Algorithms on Strings, Trees and Sequences》 这本书的介绍吧!

JS 压缩/解压工具
JS 压缩/解压工具

在线压缩/解压 JS 代码

HTML 编码/解码
HTML 编码/解码

HTML 编码/解码