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
- ios
- performance
Mastering Instruments (Part 2.5): malloc, free, and ARC — How Memory Works Under the Hood
Viscerally understand what happens when your code runs. Visualize malloc, free, reference counting, and retain cycles with interactive components.
-
- swift
- swift-zero-expert
- swift-fundamentals
Swift from Zero to Expert #3: Strings and Characters — much more than text
Unicode scalars, grapheme clusters, why string[0] doesn't exist in Swift, and how Substring shares memory with the original String.
-
- swift
- swift-zero-expert
- swift-fundamentals
Swift from Zero to Expert #2: Collections — Array, Set and Dictionary under the hood
Discover how Swift's collections work inside: when to use each one, their algorithmic complexity, and the elegance of copy-on-write.