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 #11: Optionals & Optional Chaining
Swift's antidote to the billion-dollar mistake. Optional is just an enum — and nil, if let, guard let, ??, !, and optional chaining all compile down to checking which case you're in.
-
- swift
- swift-zero-expert
- swift-fundamentals
Swift from Zero to Expert #10: Inheritance & Initialization
Subclassing, overriding, and super. Designated vs convenience initializers, two-phase initialization, failable and required init, and deinit — the full lifecycle of a class, explained in memory.
-
- swift
- swift-zero-expert
- swift-fundamentals
Swift Zero to Expert #9: Properties, methods, and subscripts
Stored vs computed properties, observers, lazy, static. How properties define the memory layout and why computed = zero storage.