The Essential Swift Concurrency Course for a Seamless Swift 6 Migration

Go from confusion to confidence with a step-by-step Swift Concurrency course, helping you smoothly migrate to Swift 6 and fully leverage its features.

Get lifetime access for $79 (normally $99)

Limited-time offer while new course modules are in development

COURSE MODULES

Your Structured path towards becoming a Swift Concurrency expert

A step-by-step introduction to several aspects and features that build up from the foundation to advanced learnings like migrating an existing codebase.

Introduction to Swift Concurrency

Swift Concurrency starts by understanding the core concept and developing a proper concurrency mindset. We’ll look at the history that got us to async/await, what structured concurrency means, and how concurrency relates to Swift 6.

  • Introduction to this course: Learning with video, text, and quizes
  • The Swift Concurrency Course Manifesto: The async/await origin story
  • What is Structured Concurrency?
  • The relationship of Swift 6 to Swift Concurrency
  • Assessment
  • Introduction to async/await syntax
  • Understanding the order of execution
  • Calling async functions in parallel using async let
  • Performing network requests using URLSession and async/await
  • Assessment

Async/Await Basics: The Foundation of Concurrency

Understanding async/await is key to writing concurrent code in Swift. In this module, you’ll learn how to define asynchronous methods, manage execution order, and run tasks in parallel. Finally, you’ll apply these concepts by making a network request with URLSession.

Understanding Tasks in Swift Concurrency

Tasks allow you to start new concurrent contexts in Swift. In this module, you’ll explore structured and unstructured tasks, learn when to use each, and see how to combine them effectively using async let and TaskGroup for better concurrency management.

  • Introduction to tasks in Swift Concurrency
  • Task cancellation
  • Error handling in Tasks
  • Detached Tasks
  • Task Groups
  • The difference between structured and unstructured tasks
  • Managing Task priorities
  • Task.yield() vs. Task.sleep()
  • Task local storage using @TaskLocal
  • Running tasks in SwiftUI
  • Explaining the concept of Sendable in Swift
  • Understanding Data Races vs. Race Conditions: Key Differences Explained
  • Conforming your code to the Sendable protocol
  • Sendable and Value Types
  • Sendable and Reference Types
  • Using @Sendable with closures
  • Using @unchecked Sendable
  • Concurrency-safe global variables
  • Combining Sendable with custom Locks

Sendable: Ensuring Thread-Safe Type Sharing

The Sendable protocol, along with @Sendable and sendable, helps you safely pass both value and reference types across concurrency domains. In this module, you’ll learn when and how to make your types conform to Sendable, ensuring your code remains both safe and efficient.

Managing State Safely using Actors

Actors help you manage shared mutable state in a thread-safe way. In this module, you’ll learn how actors work, how to create and interact with them, and when to use @MainActor for UI-related tasks. You’ll also explore global actors and the differences between isolated and non-isolated access, ensuring you write safer and more predictable concurrent code.

  • Understanding actors in Swift Concurrency
  • An introduction to Global Actors
  • Creating and interacting with actors
  • When and how to use @MainActor
  • Isolated vs. non-isolated access in actors
  • Working with asynchronous sequences
  • AsyncSequence vs. AsyncStream
  • Using AsyncStream and AsyncThrowingStream in your code

AsyncStream & AsyncSequence: Handling Asynchronous Data Streams

Swift’s AsyncSequence and AsyncStream allow you to work with asynchronous data streams efficiently. In this module, you’ll learn how to use them, understand the differences between an async sequence and an async stream, and integrate both into your own code for handling continuous or event-driven data.

Threading: How It All Connects

Threads play a crucial role in Swift Concurrency, impacting how tasks are scheduled and executed. In this module, you’ll learn how threads relate to tasks and whether you can control the threads a task runs on. You’ll also explore task suspension points to better understand how Swift efficiently manages concurrency behind the scenes.

  • Understanding threads and their role in Swift Concurrency
  • How Threads relate to Tasks
  • Dispatching to different threads
  • Understanding Task suspension points
  • Overview of memory management in Swift Concurrency
  • Preventing retain cycles when using Tasks

Memory Management in Swift Concurrency: Avoiding Common Pitfalls

In this module, you’ll get an overview of how memory management works in Swift Concurrency. You will learn techniques to prevent retain cycles when using Task, ensuring your asynchronous code remains efficient and reliable.

Testing Concurrent Code in Swift

Writing reliable concurrent code requires robust testing strategies. In this module, you’ll learn how to test concurrency using XCTest and Swift Testing, ensuring correctness and stability. You’ll also explore Swift Concurrency Extras by Point-Free, a powerful toolkit for improving testability in async code.

  • Testing concurrent code using XCTest
  • Testing concurrenct code using Swift Testing
  • Using Swift Concurrency Extras by Point-Free
  • Challenges in migrating to Swift Concurrency
  • Techniques for rewriting closures to async/await syntax
  • How and when to use @preconcurrency
  • Migrating away from Functional Reactive Programming like RxSwift or Combine

Migrating From Closure-Based Code To Swift Concurrency

Transitioning to Swift Concurrency comes with its own set of challenges, even before migrating to Swift 6. In this module, you’ll learn key migration strategies, including rewriting closure-based code to async/await, when to use @preconcurrency for compatibility, and deciding when and how to move away from Functional Reactive Programming frameworks like RxSwift or Combine.

Swift 6 and Concurrency: Preparing for the Future

Swift 6 brings significant changes to concurrency, impacting the strictness of compile-time safety. In this module, you’ll explore these changes, learn step-by-step migration strategies, and see how to use Xcode build settings to transition incrementally. You’ll also discover how to enable Swift 6 features selectively, migrate Swift Packages, and address common migration challenges through a detailed FAQ.

  • The impact of Swift 6 on Swift Concurrency
  • Steps to migrate existing code to Swift 6 for concurrency
  • Using Xcode Build Settings to migrate incrementally
  • Enabling Swift 6 features one by one
  • Migrating Swift Packages to Swift 6
  • Frequently Asked Questions (FAQ) around Swift 6 Migrations
  • Obtaining your certificate to showcase your knowledge on platforms like LinkedIn

Final Steps: Certification & Reflection

After completing all modules, it’s time to reflect on your learnings and earn your official SwiftLee Courses Certification. This signed certificate can be added to your resume and LinkedIn profile to showcase your expertise in Swift Concurrency. For companies requiring validation when you apply for a job, official verification is available—providing proof of your skills and knowledge.

An Efficient way of learning
Swift Concurrency

Combining text-based lessons with video explanations and knowledge assessments.

Text-based lessons

Explaining and learning code is most effective through text. It allows for easy reference to past lessons and seamless copy-pasting of code examples.

Which of these points will run on the main thread?

struct ThreadingQuestion {
    
    @MainActor
    func updateUI() {
        Task {
            /// Point 1
            
            await someOtherTask()
            
            /// Point 3
        }
    }
    
    func someOtherTask() async {
        /// Point 2
    }
}

Video Explanations

Core concepts are broken down in detailed videos, helping you develop a concurrency mindset through visual learning.

PRICING

One package,
everything included

All in One

$79 $99

Limited-time offer while new course modules are in development

What’s included:

  • 57+ Lessons
  • 11 assessments
  • Multiple videos
  • Swift Concurrency Playgrounds
  • Xcode Projects & Code Examples
  • Lifetime updates
  • An official certificate after completion