The problem 6.2 set out to fix
Swift 6 made data races a compile error, and it did so by assuming that any code without an annotation might run concurrently. Most app code does not. It runs on the main thread, awaits a network call, and updates the UI. Under the Swift 6.0 rules that code still produced errors about globals, delegate conformances and non-Sendable values, even though nothing ran in parallel. The Swift team’s approachability vision calls these false positives in sequential code, and Swift 6.2 (September 2025, Xcode 26) shipped the first set of changes to remove them.
There are two separate switches. They are often described together, and Matt Massicotte stresses that they are independent: you can turn on one without the other.
Switch 1: Approachable Concurrency
In Xcode the Approachable Concurrency build setting (SWIFT_APPROACHABLE_CONCURRENCY) turns on a bundle of upcoming features. Xcode’s own setting description lists five: DisableOutwardActorInference, GlobalActorIsolatedTypesUsability, InferSendableFromCaptures, InferIsolatedConformances and NonisolatedNonsendingByDefault. The first three are already part of the Swift 6 language mode, so in a Swift 6 target the setting adds the last two.
Nonisolated async functions stay on the caller’s actor
Before 6.2, a nonisolated async function always left the caller’s actor and ran on the global concurrent executor. SE-0461 changes the default under the NonisolatedNonsendingByDefault feature: such a function now runs wherever the caller is. The explicit spelling is nonisolated(nonsending), which you can write in any language mode.
This removes one of the most confusing errors in Swift 6.0. Here a main-actor model calls an async method on a plain class:
import Foundation
final class Renderer {
var cache: [Int] = []
func render(_ data: Data) async -> Data {
data
}
}
@MainActor
final class GalleryModel {
let renderer = Renderer()
var thumbnail: Data?
func update(with data: Data) async {
thumbnail = await renderer.render(data)
}
}
With Swift 6.0 semantics this fails with “sending ‘self.renderer’ risks causing data races”, because render hops off the main actor and takes a non-Sendable object with it. With NonisolatedNonsendingByDefault it compiles: render runs on the main actor because its caller does, so nothing crosses a boundary.
@concurrent is how you ask for the background
The flip side is that nonisolated async no longer means “off the main thread”. When you want parallel work, say so with @concurrent:
@concurrent
func resize(_ data: Data) async -> Data {
data
}
@concurrent implies nonisolated, always runs on the concurrent executor, and only applies to async functions. Arguments and results must be Sendable or provably unused afterwards. Massicotte’s network request walkthrough uses it the same way: do the expensive part in a @concurrent function, return the value, and assign it in the main-actor caller.
Isolated conformances
SE-0470 lets a main-actor type conform to a nonisolated protocol with the conformance itself limited to the main actor:
protocol Refreshable {
func refresh()
}
@MainActor
final class InboxModel: @MainActor Refreshable {
var count = 0
func refresh() {
count += 1
}
}
The compiler rejects any use of that conformance outside the main actor, including passing the type to generic code that requires Sendable. With InferIsolatedConformances on, a main-actor type’s conformances are isolated automatically, so you rarely write @MainActor in the conformance list yourself.
Switch 2: Default Actor Isolation
SE-0466 adds a per-module default. In Xcode it is Default Actor Isolation (SWIFT_DEFAULT_ACTOR_ISOLATION), with the values nonisolated (the default) and MainActor. On the command line it is -default-isolation MainActor. In a package manifest with tools version 6.2:
// swift-tools-version: 6.2
import PackageDescription
let package = Package(
name: "Feature",
platforms: [.iOS(.v17)],
targets: [
.target(
name: "FeatureUI",
swiftSettings: [
.defaultIsolation(MainActor.self),
.enableUpcomingFeature("NonisolatedNonsendingByDefault"),
.enableUpcomingFeature("InferIsolatedConformances"),
]
),
]
)
Keith Harrison’s Use Your Loaf post covers this manifest setup, which you need because packages do not get Xcode’s single Approachable Concurrency switch.
With MainActor as the default, every unannotated declaration in the module is inferred @MainActor: types, functions, globals and statics. The proposal lists the exceptions. Explicit isolation wins. Anything inside an actor keeps the actor’s isolation. Declarations that inherit isolation from a superclass, an overridden method or a protocol keep it. A declaration marked nonisolated opts out, and so do types nested inside it.
Massicotte notes that Xcode 26 turns on MainActor default isolation for new app targets. Existing projects keep their settings, so check both values in an older project before you assume either.
What your code looks like with both on
A typical model needs no annotations at all:
import Foundation
import Observation
nonisolated struct Profile: Codable {
var name: String
}
@Observable
final class ProfileModel {
var profile: Profile?
var isLoading = false
func load(from url: URL) async throws {
isLoading = true
defer { isLoading = false }
let (data, _) = try await URLSession.shared.data(from: url)
profile = try await Self.decode(data)
}
@concurrent
static func decode(_ data: Data) async throws -> Profile {
try JSONDecoder().decode(Profile.self, from: data)
}
}
This snippet assumes a module built with -default-isolation MainActor and both upcoming features. ProfileModel is main-actor isolated by inference. URLSession does the networking on its own, and the await frees the main actor while it waits. The decode runs in parallel because it is @concurrent.
Notice the nonisolated on Profile. Without it, the struct is inferred @MainActor, its Codable conformance becomes main-actor isolated, and the decode fails to compile with “main actor-isolated conformance of ‘Profile’ to ‘Decodable’ cannot be used in @concurrent context”. This is the single most common surprise when you turn the default on. Mark plain data types that cross actors, such as models, DTOs and value types used by background work, as nonisolated.
Migrating an existing module
For NonisolatedNonsendingByDefault, SwiftPM can apply the fix-its for you. Start from a clean working tree, because it edits files in place:
swift package migrate --to-feature NonisolatedNonsendingByDefault
The migration adds @concurrent to existing nonisolated async functions so they keep today’s behavior, then enables the feature in the manifest. Review the diff. Some of those functions never needed to leave the caller, and dropping @concurrent from them is usually the better end state. SE-0461 also warns that work that used to run off the main actor can now stay on it, so watch for heavy synchronous code inside formerly nonisolated async functions.
If you ship a binary framework, changing a function to nonisolated(nonsending) is an ABI change, because the caller’s actor is passed in as a hidden parameter.
Default isolation has no migration tool. Turning it on mostly removes errors in app code, and the work is adding nonisolated to the types that should not be main-actor bound.
Where the community disagrees
On Approachable Concurrency itself there is little debate. The features make async code behave the way most people already expected.
Default MainActor isolation is contested.
- The Swift team’s vision document argues that executable targets should default to the main actor, while libraries should stay
nonisolatedunless they are UI libraries or used only to organize code inside one app. - Donny Wals says it makes a lot of sense for app targets, probably yes for UI packages, and probably no for networking packages, which should use
Sendabletypes or actors. - Paul Hudson welcomes it, noting that many apps already run nearly everything on the main actor without a visible cost.
- Matt Massicotte recommends against it. His argument is that you will meet concurrency eventually, and the default makes it harder to see when
MainActoris the wrong choice and why. He also points out that Apple’s own libraries will not adopt the mode, so you will always work across two sets of rules.
This article recommends the Swift team’s split. Turn on Approachable Concurrency everywhere. Use MainActor default isolation for the app target and UI-only modules. Keep data, networking and persistence modules nonisolated with explicit Sendable types and actors. Massicotte’s warning still applies inside the app target: when something has to run in parallel, mark it with @concurrent and make its inputs Sendable instead of fighting the inferred isolation.
What changed after 6.2
Swift 6.3 (March 2026) had no headline concurrency features. Its release post covers the @c attribute, module selectors and the Android SDK. Module selectors let you write Swift::Task when another imported module also defines a Task type, which helps in projects with their own Task model.
Swift 6.4 (September 2026, Xcode 27) adds several concurrency changes, per its release post and the proposals:
- SE-0493:
deferblocks can containawait. The async cleanup runs to completion before the scope exits. - SE-0504:
withTaskCancellationShieldruns a block that does not see the enclosing task’s cancellation, for cleanup that must finish. In the iOS 27 SDK it is available from iOS 27. - SE-0520: a new warning fires when you create a throwing
Taskand never use it, since its error would be silently dropped. Handle the error inside the task or keep the handle. - SE-0518:
~Sendablemarks a type as deliberately non-Sendableand stopsSendableinference.
SE-0478, which adds file-level defaults (including default isolation per file), was accepted but is not part of 6.4. Until it ships, isolation defaults stay per module.
Traps
- Inferred isolation hides intent. Readers cannot tell from a file whether it is main-actor isolated. Note the module’s setting in its README.
- Protocols with concurrent requirements. Massicotte notes that some protocols are incompatible with isolated conformances, typically ones whose requirements are called from background threads. Use a nonisolated type for those.
Task {}inherits the caller. In a main-actor-by-default module,Task {}runs on the main actor. That is usually right, but CPU-heavy work in it blocks the UI. Call a@concurrentfunction from the task.MainActor.runeverywhere. If you find yourself wrapping code inMainActor.run, the function should probably be main-actor isolated, which the default often already gives you.
Decision table
| Module | Approachable Concurrency | Default isolation |
|---|---|---|
| App target | On | MainActor |
| UI component package | On | MainActor |
| Networking, sync, persistence | On | nonisolated |
| Shared models | On | nonisolated, types Sendable |
| Binary framework you ship | On, after checking ABI | nonisolated |
| Command-line tool or script | On | MainActor |
Sources and further reading
- Swift 6.2 Released swift.org
- SE-0466: Control default actor isolation inference Swift Evolution
- SE-0461: Run nonisolated async functions on the caller's actor by default Swift Evolution
- SE-0470: Global-actor isolated conformances Swift Evolution
- Improving the approachability of data-race safety Swift Evolution vision document
- MainActor by Default Matt Massicotte
- Should you opt-in to Swift 6.2's Main Actor isolation? Donny Wals
- What's new in Swift 6.2? Paul Hudson, Hacking with Swift
- Approachable Concurrency in Swift Packages Keith Harrison, Use Your Loaf
- Swift 6.4 Released swift.org
- Swift 6.3 Released swift.org