How can I use swift in Terminal?

后端 未结 13 598
北荒
北荒 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 15:58

    make sure you install xcode 6.0 ,but not 6.1

    If you get an error:

    :0: error: the SDK 'MacOSX10.9.sdk' does not support Swift
    

    just run

    xcrun --sdk iphonesimulator8.0 swift
    

    or you can

    export SDKROOT="iphonesimulator8.0" 
    

    and then

    xcrun swift
    

    Use "xcodebuild -showsdks" to list the available SDK names.

    if you install xcode 6.1,just

    sudo xcode-select -s /Applications/*your-Xcode-6.1-path.app*/Contents/Developer
    xcrun swift
    

提交回复
热议问题