How can I use swift in Terminal?

后端 未结 13 608
北荒
北荒 2020-11-29 15:28

I read What\'s new in Xcode 6. The article introduces some new feature about Xcode 6, and it says:

Command Line

Xcode’s debugger includes an inter

13条回答
  •  臣服心动
    2020-11-29 16:09

    After installing the official Xcode 6.1 release, there is a swift command in /usr/bin/swift.

    Bear in mind that if you have a Python different from the Apple-supplied Python in the path, swift can fail with ImportError: No module named site. In that case, make sure that you do export PATH=/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/sbin before calling swift.

提交回复
热议问题