what new in swift 2026

Asked on 2026-06-13

1 search

Here are the main new things in Swift for WWDC 2026, based on What’s new in Swift and the Swift section in Platforms State of the Union:

Language and compiler improvements

  • anyAppleOS availability: you can now condense Apple platform availability checks into a single platform name instead of repeating multiple OS names.
  • @diagnose attribute: new tooling for improving diagnostics.
  • Module selectors (::): new syntax for accessing members across modules.
  • Better type checking performance: especially for complex expressions and SwiftUI View bodies, with more actionable errors when type checking struggles.
  • Async in defer now works: the limitation on awaiting inside defer blocks is removed.

Everyday workflow improvements

  • Warning control: you can suppress warnings in specific parts of code or promote warnings to errors where you want stricter enforcement.
  • More flexible memberwise initializers: structs with a mix of internal and private properties now get a second memberwise initializer usable from other files in your project.

Libraries and APIs

  • Swift Testing updates
  • Subprocess 1.0
  • Foundation updates
  • New standard library additions

Swift across more platforms

  • Swift–C interoperability improvements with @C attribute
  • Swift-Java
  • WebAssembly and JavascriptKit
  • Embedded Swift continues to expand
  • More work on beyond Apple platforms

Performance and advanced language features

  • Performance tuning
  • Optimizer control with:
    • @inline(always)
    • @specialized
  • Ownership system and noncopyable types
  • Iterable protocol and borrow/mutate accessors
  • New standard library types like UniqueBox, UniqueArray, and Ref

Future direction

  • The session also covers the future of Swift, including ongoing open-source work and ecosystem development.

If you want, I can also give you a short “top 5 changes” summary or a section-by-section breakdown with timestamps.