Launch Swift 3 from the command line using Xcode 8 Beta

Can I run Swift 3 from the command line after installing Xcode 8 beta? I see that / usr / bin / swift is still May 5th Swift 2.2. I was hoping to see something like / usr / bin / swift 3, but there wasn’t such luck.

The swift.org download says that "Swift 3.0 Preview 1 is available as part of the beta version of Xcode 8.0." But I did not find instructions on running the Swift 3 command line using Xcode 8 beta.

Ideally, I would like to use the interactive REPL ... as well as compile the Swift Package Manager .

+5
source share
2 answers
sudo xcode-select -s /Applications/Xcode-beta.app swift 
+8
source

Launch Xcode-Beta and change Command line tools

enter image description here

Profit:

enter image description here

+5
source

All Articles