What’s new in Swift

Dive into the latest features and capabilities.

Swift 6.4

Swift 6.4 delivers improvements designed for developers at every level. A set of ergonomic refinements remove everyday friction, including simplified availability syntax with anyAppleOS and finer-grained control over warnings with the @diagnose attribute. Asynchronous code is now supported in defer statements, guaranteeing cleanup runs whether a function returns or throws. A new iteration protocol extends for-in loops to noncopyable types like Span and InlineArray, letting performance-critical code iterate without unnecessary copying. Foundation sees major performance gains, with URL parsing up to 4x faster. And Swift Testing gains XCTest interoperability for smoother incremental migration.