使用Xcode 8 Beta从命令行运行Swift 3 [英] Run Swift 3 from command line using Xcode 8 Beta
问题描述
在安装Xcode 8 beta之后,我可以从命令行运行Swift 3吗?
我看到/ usr / bin / swift仍然是5月5日的Swift 2.2。我希望看到类似/ usr / bin / swift3的东西,但是没有这种运气。
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下载表示 Swift 3.0 Preview 1是Xcode 8.0 beta的一部分。但是我还没有找到关于使用Xcode 8 beta运行命令行Swift 3的说明。
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.
理想情况下,我也想使用交互式REPL ...和 Swift Package Manager 代码的命令行编译一样。
Ideally, I would like to use the interactive REPL ... as well as do command-line compilation of Swift Package Manager code.
推荐答案
sudo xcode-select -s /Applications/Xcode-beta.app
swift
这篇关于使用Xcode 8 Beta从命令行运行Swift 3的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!