How can I use swift in Terminal?

后端 未结 13 586
北荒
北荒 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:12

    open Terminal,

    $sudo xcode-select -switch /Applications/Xcode6-Beta6.app/Contents/Developer

    Notice: The Xcode6-Beta6.app should be replaced to appropriate version you installed

    Then put this line alias swift='xcrun swift' to ~/.bash_profile

    And,

    $source ~/.bash_profile

    $swift

    There you go!

提交回复
热议问题