Foundation and Swift changes

Asked on 06/15/2025

1 search

At WWDC, Apple introduced several updates and changes to Swift and Foundation. Here are some key highlights:

  1. Swift 6.2 and Foundation: Swift 6.2 modernizes more of Foundation's API surface and introduces new APIs to streamline everyday programming tasks. This includes a new package for launching subprocesses, which can be added and imported to your projects. The Foundation has been rewritten from legacy C and Objective-C into modern, portable Swift, resulting in more consistent, higher quality, and better performance across all platforms. This new implementation is open source, inviting community contributions.

  2. Swift Testing: A new framework called Swift Testing was introduced, which is designed to be approachable, expressive, flexible, and scalable. It takes advantage of modern Swift features such as macros and integrates seamlessly with concurrency. The vision is for Swift Testing to become the ecosystem's official default testing solution.

  3. Concurrency and Performance: Swift 6 introduces a new language mode that achieves data race safety, expanding Swift's safety guarantees to concurrent programs. This is part of a broader effort to make concurrency more approachable and help developers achieve peak performance when needed.

  4. Development Workflow Improvements: There are enhancements in writing, building, and debugging Swift code. For example, background indexing is enabled by default for SwiftPM projects in VS Code, and improvements have been made to SourceKit for better code completion results.

  5. Swift's New Space: Swift is moving to a new organization on GitHub, swiftlang, which will host critical projects for the Swift ecosystem, including the Swift Compiler and Foundation.

For more detailed information, you can refer to the sessions "What’s new in Swift" from WWDC 2024 and WWDC 2025.