Embracing Swift concurrency

Asked on 2025-07-18

1 search

The session "Embracing Swift concurrency" at WWDC 2025 provides a comprehensive overview of how to effectively use Swift concurrency in your app. It covers the following key topics:

  1. Introduction to Concurrency: Concurrency allows your app to perform multiple tasks simultaneously, improving responsiveness, especially during high-latency operations like network requests or file reading.

  2. Single-threaded Code: Initially, your code runs on the main thread, which is easier to write and maintain. Concurrency is introduced explicitly to run code elsewhere when needed.

  3. Asynchronous Tasks: These tasks help manage operations that take a long time, such as network access, by moving them off the main thread.

  4. Concurrency Tools: Swift provides tools like actors and tasks to express concurrent operations, helping to separate code from the main thread and improve app performance.

  5. Data Safety: Swift's concurrency model is designed to prevent data races by identifying shared data across concurrent tasks at compile time.

  6. Actor Isolation: For Swift modules interacting with the UI, setting the default actor isolation to mainactor is recommended to keep code on the main actor unless specified otherwise.

For a detailed walkthrough of these concepts, you can watch the session Embracing Swift concurrency (00:00:00).

Additionally, if you're interested in practical applications of these concepts, the session "Code-along: Elevate an app with Swift concurrency" provides a hands-on approach to implementing concurrency in an app. You can start with the Introduction (00:00:00) of this session for more insights.

Embracing Swift concurrency

Embracing Swift concurrency

Join us to learn the core Swift concurrency concepts. Concurrency helps you improve app responsiveness and performance, and Swift is designed to make asynchronous and concurrent code easier to write correctly. We’ll cover the steps you need to take an app through from single-threaded to concurrent. We’ll also help you determine how and when to make the best use of Swift concurrency features – whether it’s making your code more asynchronous, moving it to the background, or sharing data across concurrent tasks.

Code-along: Elevate an app with Swift concurrency

Code-along: Elevate an app with Swift concurrency

Learn how to optimize your app’s user experience with Swift concurrency as we update an existing sample app. We’ll start with a main-actor app, then gradually introduce asynchronous code as we need to. We’ll use tasks to optimize code running on the main actor, and discover how to parallelize code by offloading work to the background. We’ll explore what data-race safety provides, and work through interpreting and fixing data-race safety errors. Finally, we’ll show how you can make the most out of structured concurrency in the context of an app.

What’s new in Swift

What’s new in Swift

Join us for an update on Swift. We’ll talk about workflow improvements that make you more productive, and new and modernized library APIs for fundamental programming tasks. We’ll show examples of Swift adoption throughout more layers of the software stack. Finally, we’ll explore new language features for both improving approachability of concurrency, and achieving peak performance when you need it.