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:
我将我的项目从Swift 2.2升级到2.3 (Xcode 7升级到8),并在一个Mac上提交所有内容。
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?
我在任何文件中都找不到所谓的“工具链”。这个警告是什么意思?
5 个解决方案
#1
8
I had the same warning and i could solve the problem by cleaning the build folder (alt+shift+cmd+K)
我有同样的警告,我可以通过清理构建文件夹来解决这个问题(alt+shift+cmd+K)
#2
5
I see you have solved the problem by upgrading to Swift 3.0.
我看到你已经通过升级到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"
我遇到了同样的问题,为此做了一些研究。在Xcode中构建时,请确保设置为“Project > Build Settings >使用遗留的Swift语言版本”,设置为“Yes”
For those who are using xcrun or xcodebuild tools, I managed to solve it by using an extra option 'toolchain'
对于那些使用xcrun或xcodebuild工具的人,我通过使用一个额外的选项“工具链”来解决它
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:
“com.apple.dt.toolchain的标识符。Swift_2_3"可在:
/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.
希望这对正在开发的Swift 2.3有所帮助。
Source: https://marc.ttias.be/swift-users/2016-08/msg00188.php
来源:https://marc.ttias.be/swift-users/2016-08/msg00188.php
#3
#4
0
Toolchains are set under the Xcode menu then Toolchains. It should be set to Xcode 8. There is also a build setting in Xcode 8 called "Use legacy swift version" that should be set to YES so that you use Swift 2.3 instead of 3.
工具链设置在Xcode菜单下,然后是工具链。它应该设置为Xcode 8。Xcode 8中还有一个名为“使用遗留swift版本”的构建设置,应该设置为YES,以便使用swift 2.3而不是3。
#5
0
If you don't have "Toolchain" option under XCode menu, you need to download and install a snapshot or release first.
如果在XCode菜单下没有“工具链”选项,您需要先下载并安装快照或发布。
#1
8
I had the same warning and i could solve the problem by cleaning the build folder (alt+shift+cmd+K)
我有同样的警告,我可以通过清理构建文件夹来解决这个问题(alt+shift+cmd+K)
#2
5
I see you have solved the problem by upgrading to Swift 3.0.
我看到你已经通过升级到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"
我遇到了同样的问题,为此做了一些研究。在Xcode中构建时,请确保设置为“Project > Build Settings >使用遗留的Swift语言版本”,设置为“Yes”
For those who are using xcrun or xcodebuild tools, I managed to solve it by using an extra option 'toolchain'
对于那些使用xcrun或xcodebuild工具的人,我通过使用一个额外的选项“工具链”来解决它
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:
“com.apple.dt.toolchain的标识符。Swift_2_3"可在:
/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.
希望这对正在开发的Swift 2.3有所帮助。
Source: https://marc.ttias.be/swift-users/2016-08/msg00188.php
来源:https://marc.ttias.be/swift-users/2016-08/msg00188.php
#3
2
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
工具链并不像之前的构建那样被显式地调用。然而,它仍然存在于位置->命令行工具部分的Xcode首选项菜单。
Choosing Xcode 8 resolved the issue for me.
选择Xcode 8为我解决了这个问题。
#4
0
Toolchains are set under the Xcode menu then Toolchains. It should be set to Xcode 8. There is also a build setting in Xcode 8 called "Use legacy swift version" that should be set to YES so that you use Swift 2.3 instead of 3.
工具链设置在Xcode菜单下,然后是工具链。它应该设置为Xcode 8。Xcode 8中还有一个名为“使用遗留swift版本”的构建设置,应该设置为YES,以便使用swift 2.3而不是3。
#5
0
If you don't have "Toolchain" option under XCode menu, you need to download and install a snapshot or release first.
如果在XCode菜单下没有“工具链”选项,您需要先下载并安装快照或发布。