swift - Xcode 的 "TOOLCHAINS"设置在哪里?

标签 swift xcode

我将我的项目从 Swift 2.2 升级到 2.3(Xcode 7 到 8),并在一台 Mac 上提交了所有内容。当我从另一台 Mac 上的 git 拉取并构建时,我得到:

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

我在任何文件中都找不到名为“TOOLCHAINS”的内容。这个警告是什么意思?

最佳答案

我看到你已经通过升级到 Swift 3.0 解决了这个问题。

我遇到了同样的问题,并在这方面做了一些研究。 在 Xcode 中构建时,请确保将设置 "Project > Build Settings > Use Legacy Swift Language Version" 设置为 "is"

对于那些使用xcrunxcodebuild 工具的人,我设法通过使用额外的选项'toolchain' 解决了这个问题

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

标识符 “com.apple.dt.toolchain.Swift_2_3” 可以在以下位置找到:

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

希望这对那些使用 Swift 2.3 进行开发的人有所帮助。

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

关于swift - Xcode 的 "TOOLCHAINS"设置在哪里?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39884323/

相关文章:

Swift - 核心数据。枚举时集合发生变异

ios - 在iOS 13中使用UISearchController时,状态栏在iOS中变为白色

ios - 如何使用自定义单元格中的按钮获取自定义 UITableViewCell 的行,该按钮将发送到 deleteRowsAtIndexPaths

ios - 当 UIBarButtonItem 动画时 UITableView 出现故障

iOS 通用链接无法打开应用程序

ios - 嵌入了 UIslider 和 UI 进度 View

iphone - 如何在 iPad 模拟器上运行我的 iPhone 应用程序

xcode - 无法获得源代码的真实路径 - Xcode、SFML、C++

iphone - 从用户定义的设置中设置 Info.plist 中的 bool 属性

c# - 在 xamarin 上新创建的存档没有出现在 xcode 上? (分布构建)