UPGRADE YOUR SKILLS: Learn advanced Swift and SwiftUI on Hacking with Swift+! >>

How to install a beta version of Swift

Swift version: 5.6

Paul Hudson    @twostraws   

Xcode ships with a fixed version of Swift, but that doesn't mean you need to use that version. In fact, it's possible to install multiple versions of the Swift toolchain, and switch between them as often as you need. At the time of writing, that means you can use Swift 5.0 with Xcode 10, and try out Swift development releases alongside.

All set? Start by going to https://swift.org/download/#snapshots and looking for the latest Swift snapshot. If you're on macOS you'll see a link for "Xcode", but there are also Linux downloads available. Don't click "Debugging Symbols" or "Signature" – either click Xcode or an Ubuntu version.

This downloads a file named something like swift-DEVELOPMENT-SNAPSHOT-2016-05-09-a-osx.pkg, which contains the most recently snapshot of Swift created from the mainline development branch. Double-click to launch the installer, then follow the on-screen instructions. Expect a full install to take up about 900MB.

Once the installer has finished, launch Xcode as normal. When it loads, go to the Xcode menu in the top-left corner, and choose Toolchains > Swift Development Snapshot YOUR-DATE-HERE (a).

You'll be prompted to restart Xcode, but when it relaunches it should say “Xcode 10.0 (10A255)” then beneath that "Swift Development Snapshot YOUR-DATE-HERE (a) Toolchain", signaling that you have installed and activated the snapshot.

That's it, now brace yourself: open any of your Swift projects, and press Cmd+B to build. You might get one or two (or fifty) compile errors.

When you're done admiring the latest and greatest Swift snapshot, you can switch back to your previous Swift version returning to the Toolchains menu item. When you revert back to the default Swift version, you can delete any snapshot you don't want by going to Xcode > Settings > Components, then hovering over it and clicking the small settings icon.

BUILD THE ULTIMATE PORTFOLIO APP Most Swift tutorials help you solve one specific problem, but in my Ultimate Portfolio App series I show you how to get all the best practices into a single app: architecture, testing, performance, accessibility, localization, project organization, and so much more, all while building a SwiftUI app that works on iOS, macOS and watchOS.

Get it on Hacking with Swift+

Sponsor Hacking with Swift and reach the world's largest Swift community!

Available from iOS 7.0

Similar solutions…

About the Swift Knowledge Base

This is part of the Swift Knowledge Base, a free, searchable collection of solutions for common iOS questions.

BUY OUR BOOKS
Buy Pro Swift Buy Pro SwiftUI Buy Swift Design Patterns Buy Testing Swift Buy Hacking with iOS Buy Swift Coding Challenges Buy Swift on Sundays Volume One Buy Server-Side Swift Buy Advanced iOS Volume One Buy Advanced iOS Volume Two Buy Advanced iOS Volume Three Buy Hacking with watchOS Buy Hacking with tvOS Buy Hacking with macOS Buy Dive Into SpriteKit Buy Swift in Sixty Seconds Buy Objective-C for Swift Developers Buy Beyond Code

Was this page useful? Let us know!

Average rating: 5.0/5

 
Unknown user

You are not logged in

Log in or create account
 

Link copied to your pasteboard.