Asynchronous Swift Bootcamp: Escaping / Combine / Async, Await
In Swift, asynchronous code is a critical concept for building responsive and efficient applications. It allows certain tasks to run independently, preventing app freezes and ensuring a smooth user experience. With the async/await mechanism, developers can write asynchronous code more clearly and handle time-consuming operations while keeping the app responsive.
This bootcamp will cover a variety of different ways to perform asynchronous operations in Swift. We will cover them in the same order that they were introduce to the Swift language, starting with escaping closures, then covering Combine, and finally the new Swift Concurrency syntax with async/await.
How this course works
Below is a selection of videos the most common asychnronous code implementations in Swift. These videos have are part of larger courses. We highly recommend watching the full courses, which you can view here and also here.
Let's jump in.. We will begin with a basic understanding of threading in Swift applications. This enables us to perform code on different "threads" or in the background of our application.
As we start writing asynchronous code in the coming videos, we will be creating "references" between different objects in our code. As the developer, we need to know which of these references are strong or weak, since it can impact the performance of our application.
Now let's use what we've learned to create some escaping closures. These are asynchronous call-backs in our code.
Before we move on, let's get some real-world practice using @escaping closures!
We're now going to shift to using one of Apple's newer frameworks, Combine. This framework runs on the concept of "publishers" and "subscribers" to mange your asychronous data flow.
For the rest of the course, we're going to focus on the new Swift Concurrency syntax which is one of the newest features added to the Swift language. This is becoming the most popular way to write asynchronous code in Swift.
Swift Concurrency uses Tasks to manage asynchronous context in your code. The next few videos will address how to execute a single task as well as multiple tasks at the same time.
Let's wrap up by reminding ourselves of the strong and weak references that we will be creating when we use Swift Concurrency.
You're an expert at asynchronous code in Swift!
As a reminder, this was the abbreviated version of the course. If you're serious about SwiftUI, we highly recommend watching the full course here.
I hope this FREE course was worth your time and helped you on your journey to becoming an expert iOS developer! If you enjoyed it, please don't forget to follow us on YouTube!
YouTube: https://www.youtube.com/c/SwiftfulThinking
Join our Discord: https://discord.gg/Fm4abM2DNh
View source code: https://github.com/swiftfulthinking
Support The Channel: https://www.buymeacoffee.com/nicksarno
Join over 2,000 iOS Engineers in our Discord! We are a community focused on helping each other learn Swift and build amazing iOS applications.
Stay updated!
Add your email to get updates on new content & discounts to upcoming courses!