Currently available as a beta in Xcode 27, Swift 6.4 introduces a range of enhancements: better C interoperability, simplified OS availability check, fine-grained warning control, async support in defer, efficient iteration for non-noncopyable types, up to 4x faster URL parsing, and improved interoperability between Swift Testing and XCTest.
At the language level, the new release introduces several refinements aimed at simplifying everyday development. These include removing unnecessary parentheses in certain type expressions, additional warnings for concurrency tasks, the introduction of weak let and ~Sendable, and support for a new implicit memberwise initializer.
Instead of writing (any Int?), you can now write any Int?. Task closures will generate warnings if thrown errors are not handled. defer statements support executing async tasks using await.
The new weak let declaration enables defining as Sendable a class that was previously @unchecked Sendable due to a weak var property. Conversely, if a type should not conform to Sendable, you can now mark it explicitly using ~Sendable.
Additionally, Swift 6.4 enhances memberwise initializers: when a struct includes both private and internal properties, the compiler automatically generates two initializers, one for the internal properties and a private one including all properties.
The new anyAppleOS identifier can be used to simplify platform availability checks:
@available(macOS 27, iOS 27, visionOS 27, *)
func doSomething()
@available(anyAppleOS 27, *)
@available(tvOS 17, unavailable)
func doSomething64()
#if os(anyAppleOS)
...
#endif
Swift 6.4 also introduces finer-grained control over warnings with the new @diagnose attribute, which lets developers silence deprecation warnings, promote warnings to errors, or downgrade future errors to warnings. The attribute applies to individual function definitions.
Testing enhancements in Swift 6.4 bring more control over test execution and reporting. You can mark issues as warnings instead of failures, dynamically cancel tests, including parameterized cases, using the Test.cancel API. Flaky tests can be better handled by repeating failing tests until they pass or reach a configurable retry limit.
The new Swift release also improves interoperability between XCTest and Swift Testing by reporting XCTest assertion failures as test issues within Swift Testing and allowing Swift Testing APIs to work inside XCTest. This makes migration easier and preserves test coverage. By default, these cross-framework issues are treated as warnings, with an option to upgrade them to failures in Xcode settings.
Speaking of Swift Foundation, the new release continues its migration to Swift, replacing legacy Objective-C code to improve performance and consistency. This includes faster Data operations, improved bridging with NSData, and a unified Swift implementation of URL types, resulting in better performance and lower memory usage while keeping APIs unchanged. Additionally, the release introduces ProgressManager a new type for structured, type-safe progress reporting that integrates seamlessly with async/await and metadata handling.
Using Swift 6.4 you will also be able to expose functions written in Swift to C using the new @C attribute, which works similarly to @objc:
Any type you can import from C to Swift can also be used in functions that are exported from Swift to C, like integers pointers, imported C structs, and enums with raw integer value types. And, the compiler prevents you from accidentally passing types that are incompatible with C.
Swift 6.4 also introduces many additional features beyond the scope of this overview, including enhancements to Swift-Java, WebAssembly, and JavaScriptKit, along with performance improvements, iterable protocols, borrow/mutate accessors, and more. Be sure to watch the WWDC session recording for the full details.