What is new with Swift 6

Generated on 3/14/2025

1 search

Swift 6 introduces several new features and improvements that enhance the language's capabilities and developer experience. Here are some of the key updates:

  1. Non-Copyable Types: Swift 6 introduces non-copyable types, which suppress the default copyability of Swift types. This is useful for scenarios requiring unique ownership, such as managing system resources like files. Non-copyable types help prevent runtime issues like multiple writers to the same file and resource leaks. What’s new in Swift

  2. Data Race Safety: A significant feature in Swift 6 is the new language mode that provides compile-time data race safety. This mode is opt-in and helps diagnose concurrent access to memory, allowing developers to fix data race issues with minimal code changes. This feature is part of Swift's ongoing effort to improve concurrency safety. Platforms State of the Union

  3. Embedded Swift: Swift 6 introduces a new language subset called Embedded Swift, designed to run on highly constrained systems, expanding Swift's applicability to more environments. What’s new in Swift

  4. GitHub Organization: Swift is moving to a new organization on GitHub, which will include the Swift Compiler foundation and other ecosystem packages. This move aims to foster community growth and collaboration. What’s new in Swift

  5. Concurrency Improvements: Swift 6 builds on previous concurrency features like async/await and actors, providing full data race safety. This makes concurrent programming easier and safer by diagnosing potential issues at compile time. What’s new in Xcode 16

These updates make Swift 6 a more robust and versatile language, particularly in terms of safety and performance in concurrent programming.

What’s new in Xcode 16

What’s new in Xcode 16

Discover the latest productivity and performance improvements in Xcode 16. Learn about enhancements to code completion, diagnostics, and Xcode Previews. Find out more about updates in builds and explore improvements in debugging and Instruments.

What’s new in SwiftUI

What’s new in SwiftUI

Learn how you can use SwiftUI to build great apps for any Apple platform. Explore a fresh new look and feel for tabs and documents on iPadOS. Improve your window management with new windowing APIs, and gain more control over immersive spaces and volumes in your visionOS apps. We’ll also take you through other exciting refinements that help you make expressive charts, customize and layout text, and so much more.

Platforms State of the Union 5-Minute Recap

Platforms State of the Union 5-Minute Recap

Watch a quick recap of the newest advancements on Apple platforms.

Platforms State of the Union

Platforms State of the Union

Discover the newest advancements on Apple platforms.

What’s new in Swift

What’s new in Swift

Join us for an update on Swift. We’ll briefly go through a history of Swift over the past decade, and show you how the community has grown through workgroups, expanded the package ecosystem, and increased platform support. We’ll introduce you to a new language mode that achieves data-race safety by default, and a language subset that lets you run Swift on highly constrained systems. We’ll also explore some language updates including noncopyable types, typed throws, and improved C++ interoperability.

Migrate your app to Swift 6

Migrate your app to Swift 6

Experience Swift 6 migration in action as we update an existing sample app. Learn how to migrate incrementally, module by module, and how the compiler helps you identify code that’s at risk of data races. Discover different techniques for ensuring clear isolation boundaries and eliminating concurrent access to shared mutable state.