This is part of the Concurrency in iOS learning path. View path.
Who is this for?
This course is for intermediate Swift developers who are familiar with writing asynchronous applications, but want to leverage the new concurrency features in Swift 5.5 to write safer and more predictable asynchronous apps.
- Using async/await
- Asynchronous Sequences
Part 1: Asynchronous Code
What is Swift concurrency? Why is it better than GCD? What about Combine? In this course, you’ll learn how to create safe, performant and predictable asynchronous apps using these Swift concurrency features: async/await, Tasks, asynchronous sequences and MainActor.
Explore Task and async/await in a playground.
Learn how to set up the course server, then use async/await and the
task view modifier in the LittleJohn app’s SymbolListView.
Learn how to define
async properties and subscripts and how to iterate over built-in and custom async sequences.
AsyncSequence in the LittleJohn app’s
Learn how to handle the server becoming unavailable during a price update.
Review what you learned in Part 1 and see what’s coming up in Part 2.
Part 2: Asynchronous Sequences
Learn about the app you’ll build in this part of the course and the Swift concurrency tools you’ll use.
Challenge: Reinforce what you learned in Part 1 by implementing the list view in the SuperStorage app. Try not to peek at LittleJohn’s
async let to download server status concurrently with the files list.
Button action, call an asynchronous method that updates view properties. Use
Task to call the asynchronous method and move the model’s helper methods to
Challenge: Show/hide a progress view spinner.
Display a progress view while downloading a file in chunks.
Implement your own custom logic to cancel download tasks that you don’t need anymore.
AsyncSequence from the Combine publisher of
Challenge: Download the file chunks in parallel.
Review what you learned in this course and see what’s covered in Modern Concurrency: Beyond the Basics.