Swift 6 introduced compile-time data-race safety, which was a big step forward but also produced a wave of confusing warnings in existing apps. Swift 6.2, released alongside Xcode 26 in September 2025, focused on making that safety approachable, while adding new tools for high-performance code.
Approachable concurrency
Most app code runs on the main thread, and most apps do not need to think about concurrency until they choose to. Swift 6.2 leans into that reality.
- Main actor by default: a new build setting lets a module infer
@MainActorisolation by default (SE-0466). For typical app targets this removes a large share of concurrency warnings, because code is single-threaded unless you opt into more. - Async functions stay where they are called: with the approachable concurrency settings enabled, a non-isolated
asyncfunction runs on the caller's actor instead of hopping to a background thread (SE-0461). This removes a common source of surprising data-race errors. - Explicit background work with
@concurrent: when you genuinely want work off the current actor, you say so.
struct ImageProcessor {
@concurrent
func thumbnail(from data: Data) async -> Data {
// Expensive work that should run off the main actor
resize(data, to: 200)
}
}InlineArray and Span
Two new standard library types target performance-sensitive code.
InlineArray(SE-0453) is a fixed-size array stored inline, without a heap allocation, useful for small, known-size buffers.Span(SE-0447) provides fast, bounds-checked access to contiguous memory, a safe alternative to unsafe pointers.
var rgb: InlineArray<3, UInt8> = [255, 128, 0]
rgb[1] = 64Raw identifiers for readable tests
Identifiers can now contain spaces and other characters when wrapped in backticks (SE-0451). It is particularly nice for test names with Swift Testing.
import Testing
@Test func `order total includes all items`() {
let order = Order(items: [.init(price: 2.5, qty: 2), .init(price: 3, qty: 1)])
#expect(order.total == 8)
}Swift Testing improvements
Swift Testing, the modern replacement for XCTest-style assertions, gained exit tests, which verify that code terminates as expected under certain conditions, and attachments, which let you save extra files or data alongside test results for easier debugging.
Beyond Apple platforms
Swift 6.2 added official support for building to WebAssembly, extending Swift into browsers and other Wasm runtimes, and the official Swift extension for VS Code continued to mature, making Swift a practical option for server and cross-platform work outside Xcode.
What to do in your projects
- For app targets, try enabling the approachable concurrency and default main-actor isolation settings in a branch, then rebuild and review the remaining warnings.
- Mark truly expensive work with
@concurrentrather than relying on implicit background execution. - Adopt Swift Testing for new tests.
New to Swift, or need a refresher? Start with the Swift cheat sheet and the Codable and async/await guide.
Build settings and defaults can differ between Xcode templates and Swift package manifests. Check the Swift.org release notes for the exact settings your project uses.
Written by Alessandro Ecclesie Agazzi, freelance analytics engineer in London. Updated 30 September 2026.