
Explore Swift concurrency for beginners, from Grand Central Dispatch and completion handlers to async/await, main actor, continuation, async let, task groups, and actors.
Access the exercise files for concurrency fundamentals in Swift, download from the resources, run locally, compare your code with the examples, and resolve questions quickly.
Learn how concurrency prevents UI freezes by moving heavy tasks off the main thread to a background thread and updating the UI on the main thread with dispatch queues.
Distinguish the main UI thread's serial queue from global concurrent queues in GCD. Learn to use serial and concurrent queues, and dispatch to the main thread for UI updates.
Explore how concurrency worked in Swift before async/await by implementing a completion-handler based HTTP client with URLSession, decoding sources, and updating the UI on the main thread via dispatch queues.
Explore fetching news sources and, for each source, retrieving its news items with nested completion handlers, highlighting callback complexity and the move toward async/await for simpler code.
Learn to update legacy completion-handler code to async/await in Swift, simplifying network calls with URLSession data task, do-catch error handling, and JSON decoding for news sources and items.
Learn how async/await works in a view with the task modifier, suspending on URLSession network calls and updating the sources on the main actor.
Explore the main actor and its role in Swift concurrency. See how code runs on the main thread to keep UI updates fast while heavy work happens in the back.
Demonstrates a long running task on the main thread using sleep that freezes the SwiftUI list and makes it unscrollable.
Move resource intensive work off the main thread using async and await to keep the UI responsive, with task closures and state updates after completion.
Learn how task.detached runs off the main actor, when to use non-isolated functions, and how mainActor.run safely updates user interface state without blocking, including fire-and-forget tasks.
Explore how default actor isolation targets the main actor in Swift, and how to use main actor wrappers or MainActor.run to safely update observable state from non-isolated contexts.
Discover how continuation bridges callback-based functions to async/await in Swift, using checked continuation to create suspension points and resume the legacy get post and get all the post functions.
Bridge callback code to async/await by wrapping completion handlers with checked continuation, creating a wrapper function to fetch facts asynchronously to call a third-party library without source changes.
Explore checked and checked throwing continuations in Swift to expose async APIs safely, ensure proper resumption, and contrast them with unsafe continuation and its runtime checks.
Explore structured concurrency with async let to fetch credit scores from Experian and TransUnion in parallel, await results, and compute an apr based on the average score.
Learn why async let in a loop is a bad practice for calculating APRs from credit scores, and how task groups enable parallel SSN requests.
Use a task group to run multiple API calls and credit score calculations concurrently in Swift. Harness with throwing task group for error handling and retrieve results with try await.
Explore canceling Swift async tasks by creating a task, delaying cancellation, and observing the isCancelled state and CancellationError. Use checkCancellation and task.cancel to control flow and loops.
Learn how the SwiftUI task modifier attaches to a view, runs async work, auto-cancels when the view disappears, and uses dependencies to trigger on state changes.
Explore sensibles in Swift concurrency and how they guarantee safe data sharing between tasks or actors, enforced by compile-time checks that prevent data races.
Implement sensible types to prevent data races when handling coordinates across actor boundaries. Learn how structs versus classes, async calls, and main actor isolation influence safety, final considerations, and mutability.
Explore async sequences in Swift to stream images as they download, instead of waiting for all to finish, enabling progressive updates to the user interface.
Create a plain sequence to read a csv file containing earthquake data from a url, implementing a lines iterator that yields lines one by one.
Explore looping over an async sequence with await to process each line as it becomes available, handling errors with try await and performing actions inside the loop.
Explore how built in iOS APIs return async sequences, including file handle bytes, URL lines, URL session bytes, and notifications, enabling use of map, zip, and other operators.
Convert callback-based price updates into an async stream using AsyncStream, yielding Bitcoin prices at one-second intervals and enabling async-await usage and stream helpers.
Understand how Swift actors isolate state to prevent data races and enable concurrent access without locks or GCD, and when to use non-isolated functions or main actor for UI work.
Explore how actors protect mutable state in Swift by isolating access to a counter and coordinating with async/await to prevent race conditions during concurrent increments.
Demonstrates using actors to serialize bank account access in a SwiftUI MVVM app, preventing race conditions during concurrent withdrawals with async/await, task.detached, and a main actor for UI safety.
Demonstrate how Swift actors prevent race conditions in bank transfers by converting a bank account to an actor, adding a deposit method, and guarding balance with async/await.
Learn how the nonisolated keyword in Swift lets you call read-only actor functions without async/await when they won't mutate state, like get current Apr, while still preventing race conditions.
Build faster, smoother, and more responsive iOS apps by mastering Swift’s modern concurrency model.
If you’ve ever struggled with freezing UIs, nested completion handlers, or callback hell, this course will completely change the way you think about asynchronous programming in Swift. Apple’s new concurrency system—powered by async/await, Task, MainActor, and Actors—makes writing concurrent code safer, cleaner, and easier than ever before. But to truly harness its power, you need to understand how it works under the hood.
In Concurrency Fundamentals in Swift, you’ll learn:
- What concurrency really is and why it matters
- How Grand Central Dispatch (GCD) and completion handlers paved the way for async/await
- How to rewrite old callback-based code using modern async/await syntax
- The role of the MainActor and how to avoid blocking the main thread
- How to use Task, TaskGroup, and Task.detached for structured concurrency
- How Swift isolates data safely with Sendable and Actors
- How to create and consume asynchronous data streams with AsyncSequence
You’ll see real-world examples, hands-on demos, and downloadable projects that walk you through each concept step by step.
By the end of this course, you’ll have the confidence to build concurrency-safe apps that feel lightning-fast and never freeze — a must-have skill for every serious iOS developer.
If you’re ready to write code that’s both modern and efficient, enroll now and master Concurrency Fundamentals in Swift.