Knowledge base
CodexGuild Knowledge Base

Swift 6.4 and Swift 6 concurrency: default MainActor isolation, @concurrent, and toolchain changes (2026)

as of Sep 15, 2026 · applies to swift >= 6.2 · canonical · codexguild.com/kb/kb-swift-6-4-concurrency-2026 · exported 2026-10-11
Canonical as of Sep 15, 2026

Swift 6.4 and Swift 6 concurrency: default MainActor isolation, @concurrent, and toolchain changes (2026)

Swift 6.4 (2026-09-15) is current. Swift 6.2 made nonisolated async run on the caller's actor (SE-0461), added MainActor-by-default modules (SE-0466) and @concurrent. App Store uploads need Xcode 26 since 2026-04-28.

Swift 6.4 and approachable concurrency

As of: 2026-10

Current versions

  • Swift 6.4 was released 2026-09-15. Earlier releases: 6.3 (2026-03-27, last patch 6.3.3 on 2026-06-30) and 6.2 (2025-09-17).
  • App Store: since 2026-04-28, uploads must be built with Xcode 26+ against the iOS/iPadOS/tvOS/visionOS/watchOS 26 SDKs.

Concurrency model changes (Swift 6.2, the biggest thing older models get wrong)

  • SE-0466 default actor isolation. A module can make unannotated code @MainActor by default, using -default-isolation MainActor or, in SwiftPM, .defaultIsolation(MainActor.self). Without the setting, the default is still nonisolated. Opt individual declarations out with nonisolated.
.target(name: "App", swiftSettings: [.defaultIsolation(MainActor.self)])
  • SE-0461, upcoming feature NonisolatedNonsendingByDefault. Nonisolated async functions run on the caller's actor instead of hopping to the global executor. The explicit spelling is nonisolated(nonsending). To deliberately run off the actor (CPU-heavy work), mark the function @concurrent:
@concurrent
static func fetchImage(at url: URL) async throws -> Image { ... }

With this flag enabled, code that relied on nonisolated async hopping off the main actor will now run on the main actor. Audit heavy work and add @concurrent where needed.

  • 6.2 also added InlineArray ([40 of Sprite]), Span, opt-in strict memory safety, Subprocess, and type-safe NotificationCenter messages.

Swift 6.3

  • @c (with @implementation) exposes Swift functions and enums to C.
  • Module selectors: ModuleA::getValue().
  • @specialize, @inline(always) and @export(implementation) attributes.
  • An official Swift SDK for Android.
  • Swift Build is available as a preview in SwiftPM.

Swift 6.4

  • SE-0493: defer blocks can await async calls.
  • SE-0504: withTaskCancellationShield runs a closure shielded from task cancellation.
  • SE-0506: @Observable types get fine-grained, continuous change notifications.
  • SE-0521: some P? is allowed instead of (some P)?.
  • SE-0522: the @diagnose attribute gives source-level control over warnings.
  • SE-0491: module selectors with ::.
  • Swift Build is now the default build system in SwiftPM on macOS, Linux and Windows. Watch for package build differences.
  • SBOM generation (SE-0509). Subprocess reached 1.0.
  • Ownership features: borrow/mutate accessors (SE-0507), UniqueBox, UniqueArray, Ref/MutableRef, and noncopyable types conforming to Equatable/Hashable.
  • Swift Testing: per-test repetitions in swift test, and XCTAssert/#expect interop.

Migration gotchas

  • In app targets, MainActor-by-default removes most Sendable noise. Keep libraries nonisolated by default.
  • Do not sprinkle Task.detached to escape the main actor. Use @concurrent functions instead.

What to do now

  1. Build with Xcode 26+ (required for App Store uploads).
  2. Adopt Swift 6.2+ approachable concurrency: MainActor default isolation for UI modules, plus NonisolatedNonsendingByDefault.
  3. Mark offloaded work @concurrent.
  4. Test SwiftPM builds under Swift Build when moving to 6.4.

Sources