Swift 6.4: what’s new for app developers
Short answer: Swift 6.4 was announced as released on Swift.org in September 2026, and it is the compiler in Xcode 27, in Xcode 27.1, released on October 15, 2026, and in the 27.2 beta. For app code, the headline changes are async code in defer, cancellation shields for cleanup, some Rocket? without parentheses, a @diagnose attribute to control warnings in source, and module selectors (::) for name clashes. Tooling gets Swift Build as SwiftPM’s default, SBOM generation, and easier migration between XCTest and Swift Testing.
Swift 6.4 changes most relevant to app code
From «Swift 6.4 Released» on Swift.org. Proposal numbers as listed there.
| Change | Proposal |
|---|---|
| Optional some/any without parentheses: some Rocket? | SE-0521 |
| @diagnose attribute to suppress warnings or promote them to errors in source | SE-0522 |
| Module selectors with :: to pick between same-named APIs | SE-0491 |
| Async calls in defer blocks, awaited before exit | SE-0493 |
| withTaskCancellationShield for cleanup that must not be cancelled | SE-0504 |
| Fine-grained, continuous change notifications for @Observable types | SE-0506 |
| XCTAssert inside Swift Testing and #expect inside XCTest | ST-0021 |
| SBOM generation in SwiftPM (SPDX or CycloneDX) | SE-0509 |
Concurrency: cleanup that always runs
Two changes work together. Async code in a defer block is now awaited and runs to completion before the scope exits, and withTaskCancellationShield runs a closure shielded from the enclosing task’s cancellation. Combined, they let you guarantee cleanup work such as closing a session or flushing a cache, however the function returns. Foundation’s ProgressManager also gains async/await support.
Testing and tooling
Migrating to Swift Testing gets easier: XCTAssert works inside Swift Testing tests and #expect inside XCTests, CustomTestReflectable customizes values shown in failures, swift test can repeat test cases, and tests can record attachments that conform to Transferable on Apple platforms. SwiftPM now builds with Swift Build by default, so packages build the same way on Linux, macOS and Windows. Debugging is more robust, with LLDB importing modules through precise dependency tracking, and dSYM bundles shrink because binary Swift modules are no longer embedded. The Swift VS Code extension is now on the Open VSX Registry, so it works in Cursor, Antigravity and other editors too.
Android, WebAssembly and interop
The Swift SDK for Android is built with the LTS NDK 30, and SwiftPM supports Android through Swift Build without a post-install script. Swift/Java interop extends async and throwing support to protocol and callback wrappers. For the browser, JavaScriptKit bridging is up to 40 times faster than earlier dynamic bridging, and the Wasm SDK installs from Swift.org. C++20 std::span bridges directly with Swift’s Span.
Performance without copies
New types extend the work on non-copyable types: UniqueArray stores non-copyable elements without copy-on-write allocations, UniqueBox uniquely owns a heap value without reference counting, Ref and MutableRef borrow or mutate one value at a time, and the Iterable protocol loops over elements without copying them. Non-copyable types can conform to Equatable, Comparable and Hashable. Subprocess reaches 1.0 for running other programs from Swift.
Which Xcode has Swift 6.4
Apple’s Xcode 27.1 release notes say it includes Swift 6.4, and the SDK table lists the same compiler for the Xcode 27.2 beta, both needing macOS Tahoe 26.6 or later, with Swift 6, 5, 4.2 and 4 language modes. For when App Store uploads must use the 27 SDKs, see the Xcode and SDK upload requirement; Apple’s on-device AI APIs are covered in Apple Foundation Models. Shipping cross-platform instead, see what changes in Flutter 3.47 and when React Native 0.88 lands.
Where Censuus fits
A new toolchain helps you ship better code; being found brings people to what you ship. Censuus ranks apps by the visits they draw, and adding your app is free on the List my app form. Placement comes from traffic and sponsorship: apps climb on the visits they draw, and a sponsor can pay to rise higher.
Frequently asked questions
When was Swift 6.4 released?
Swift.org announced the Swift 6.4 release in September 2026.
Which Xcode version includes Swift 6.4?
Xcode 27.1, released on October 15, 2026, includes Swift 6.4, and so does the Xcode 27.2 beta. Both need macOS Tahoe 26.6 or later.
Can I use await in a defer block?
Yes, from Swift 6.4 (SE-0493). Async code in defer is awaited and runs to completion before the scope exits.
Can I mix XCTest and Swift Testing assertions?
Yes. Swift 6.4 lets you use XCTAssert in Swift Testing tests and #expect in XCTests (ST-0021).
What is the default build system in SwiftPM 6.4?
Swift Build, so projects build the same way on Linux, macOS and Windows.
Guides for app developers
Put your app in the ranking
Censuus ranks apps by the visits they draw and by sponsorship, no bots. Listing is free; sponsorship raises placement.