Where is Xcode's “TOOLCHAINS” set?

前端 未结 5 439
[愿得一人]
[愿得一人] 2020-12-31 10:27

I upgraded my project from Swift 2.2 to 2.3 (Xcode 7 to 8), and committed everything on one Mac. When I pulled from git on my other Mac, and built, I get:

W         


        
5条回答
  •  遥遥无期
    2020-12-31 10:52

    I see you have solved the problem by upgrading to Swift 3.0.

    I encountered the same problem, and did some research in this. When building within Xcode, make sure you have the setting " Project > Build Settings > Use Legacy Swift Language Version" set to "Yes"

    For those who are using xcrun or xcodebuild tools, I managed to solve it by using an extra option 'toolchain'

    xcrun --toolchain "com.apple.dt.toolchain.Swift_2_3"
    xcodebuild -toolchain "com.apple.dt.toolchain.Swift_2_3"
    

    The identifier "com.apple.dt.toolchain.Swift_2_3" can be found at:

    /Applications/Xcode-beta.app/Contents/Developer/Toolchains/Swift_2.3.xctoolchain/ToolchainInfo.plist
    

    Hope this helps for those who are developing in Swift 2.3.

    Source: https://marc.ttias.be/swift-users/2016-08/msg00188.php

提交回复
热议问题