Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Where is Xcode's "TOOLCHAINS" set?

Tags:

xcode

swift

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:

Warning: target specifies SWIFT_VERSION = '2.3', but it is overridden by TOOLCHAINS = 'com.apple.dt.toolchain.XcodeDefault'

I can't find anything called "TOOLCHAINS" in any file. What's this warning mean?

like image 257
J. Cocoe Avatar asked Oct 05 '16 21:10

J. Cocoe


4 Answers

If you don't have "Toolchain" option under Xcode menu, you need to download and install a snapshot or release first.

like image 176
Andrey Volobuev Avatar answered Sep 27 '22 22:09

Andrey Volobuev


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

like image 30
Youri Nooijen Avatar answered Nov 07 '22 16:11

Youri Nooijen


I had the same warning and i could solve the problem by cleaning the build folder (alt+shift+cmd+K)

like image 8
Areal-17 Avatar answered Nov 07 '22 16:11

Areal-17


Toolchains is not explicitly called out as it was in the prior builds. However, it is still there in the Locations -> Command Line Tools portion of the Xcode Preferences menu

Choosing Xcode 8 resolved the issue for me.

enter image description here

like image 7
MobileVet Avatar answered Nov 07 '22 16:11

MobileVet