approachable concurrency

Asked on 06/10/2025

1 search

The concept of "approachable concurrency" in Swift is discussed in the context of making concurrency easier to adopt and use in your projects. This involves several language changes and settings that are designed to simplify the introduction of concurrency, especially for projects that primarily interact with the UI.

In the session titled "Embracing Swift concurrency" from WWDC 2025, it is recommended to use the "Approachable Concurrency" setting, which enables a suite of features that make working with concurrency more straightforward. This setting is particularly useful for Swift modules that interact with the UI, as it sets the default actor isolation to mainactor, ensuring that code runs on the main actor unless specified otherwise. This approach helps in writing single-threaded apps more easily and provides a smoother path to introducing concurrency when needed.

Additionally, in the session "What’s new in Swift," it is mentioned that these language changes are opt-in and can be enabled under the Swift Compiler Concurrency section of Xcode Build Settings. Swift 6.2 includes migration tooling to assist in making necessary code changes automatically, making concurrency more approachable for developers.

For more detailed information, you can refer to the session Embracing Swift concurrency (26:37) and What’s new in Swift (36:11).

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.

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.

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.