Run Swift 3 from command line using Xcode 8 Beta

旧巷老猫 提交于 2019-12-07 05:15:33

问题


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

swift.org downloads says that "Swift 3.0 Preview 1 is available as part of Xcode 8.0 beta." But I haven't found instructions on running a command line Swift 3 using the Xcode 8 beta.

Ideally, I would like to use the interactive REPL ... as well as do command-line compilation of Swift Package Manager code.


回答1:


sudo xcode-select -s /Applications/Xcode-beta.app 
swift



回答2:


Run Xcode-Beta and change Command line tools

Profit:



来源:https://stackoverflow.com/questions/38037971/run-swift-3-from-command-line-using-xcode-8-beta

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!