How can I actually use the new Swift 6.2 features?

Hey there, sorry if this is a silly question, but is it possible to start using some of the Swift 6.2 features in existing projects?

I installed the Xcode 26 beta & set it as my active Xcode, swift --version is 6.2 as expected, but I still can't seem to access any of the new symbols in the 6.2 standard library from Xcode.

Specifically, I'm attempting to check out the new Observations async sequence. (This symbol is obviously undefined in previous Swift versions.)

I also tried creating a brand new project (and playground), and Observations was still undefined.

Are there any specific build settings and/or feature flags I need to enable to try this out?

Thank you!

hi @lachenmayer, and welcome to the Swift forums. the initial implementation for the Observations type specifically wasn't merged until yesterday, so it is not in the Xcode 26 betas yet. it will presumably show up in the main & 6.2 branch development snapshots soon. some of the other 6.2 features are available by configuring the relevant 'upcoming feature' flag via build settings.

1 Like

Thanks Jamie! Will keep an eye out.

It works with the linux nightly docker version of swift 6.2 now - using a file named test.swift with Observerations this works:

docker run --rm -v "$PWD:/home" -w /home -ti swiftlang/swift:nightly-main swift -swift-version 6 test.swift

but with the macOS native one it does not work with snapshot main-snapshot-2025-06-20 it works compiling but crashes with an unknown symbol when running:

swiftly run swift -Xfrontend -disable-availability-checking -swift-version 6 test.swift