How can I use swift in Terminal?

后端 未结 13 594
北荒
北荒 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

    sudo xcode-select -switch /Applications/Xcode.app/Contents/Developer
    

    then you can do one of these:

    xcrun swift 
    lldb --repl
    

    As of Xcode 6.1 - typing swift in the terminal launches the REPL as well.

提交回复
热议问题