Complete Swift 6.2 Guide: Approachable Concurrency Explained
Interactive guide covering the 5 feature flags of Approachable Concurrency in Xcode 26, recommended configuration, and step-by-step migration guide.
Approachable Concurrency is a real build setting in Xcode 26 that enables a set of compiler flags to make concurrency more accessible. It comes from the vision document published by the Swift team in February 2025.
The 5 feature flags
What gets enabled when setting Approachable Concurrency = Yes
InferIsolatedConformances and NonisolatedNonsendingByDefault. The other 3 are already enabled by default.How to enable it in a Swift Package
.enableUpcomingFeature("ApproachableConcurrency") does not exist as a compiler feature flag. SWIFT_APPROACHABLE_CONCURRENCY is an Xcode-only build setting that internally enables the individual flags. In SPM, .enableUpcomingFeature() takes a String and does not validate whether the flag exists — it silently ignores it with no compilation error. You must enable the individual flags.With swiftLanguageModes: [.v6]
If your Package already uses Swift 6 language mode
In Swift 6 language mode, 3 of the 5 flags are already active by default (DisableOutwardActorInference, GlobalActorIsolatedTypesUsability, InferSendableFromCaptures). You only need to add the 2 new flags from Swift 6.2:
Without swiftLanguageModes: [.v6] (all flags)
If your Package still uses Swift 5 language mode
If you haven't migrated to Swift 6 language mode yet, you need all 5 flags explicitly:
Xcode vs SPM: the difference
How Xcode resolves these values internally
| Xcode Macro | Meaning |
|---|---|
$(SWIFT_UPCOMING_FEATURE_6_0) | Activated by Swift 6 language mode |
$(SWIFT_APPROACHABLE_CONCURRENCY) | Activated by the Approachable Concurrency = Yes toggle |
$(SETTING_DefaultValue_...) | Activated if either of the two is active (logical OR) |
.enableUpcomingFeature(). If you already use swiftLanguageModes: [.v6], you only need the 2 new ones.Related
-
- swift
- swift-zero-expert
- swift-fundamentals
Swift from Zero to Expert #15: Opaque & Boxed Protocol Types
The third door out of 'I don't want to name the concrete type'. some hides one concrete type while keeping its identity — no box, compile-time. any erases the type into a runtime box. This is how you finally return a protocol that has an associatedtype.
-
- swift
- swift-zero-expert
- swift-fundamentals
Swift from Zero to Expert #14: Generics
One swapTwoValues, one Stack<Element>, one findIndex — written once, working for every type. Generics let the caller pick the concrete type, the compiler specialize the code, and the box from #13 disappear. Array, Dictionary, Optional, and Result were generic all along.
-
- swift
- swift-zero-expert
- swift-fundamentals
Swift from Zero to Expert #13: Protocols
A protocol is a contract, not a class. It says what a type must do without saying what it is — and that single idea powers delegation, synthesized Equatable, existentials, and the protocol extensions that make Swift idiomatic.