当我在 Xcode 8 中打开项目时出现以下错误
Use Legacy Swift Language Version” (SWIFT_VERSION) is required to be configured correctly for targets which use Swift. Use the [Edit > Convert > To Current Swift Syntax…] menu to choose a Swift version or use the Build Settings editor to configure the build setting directly
参考类似的post https://stackoverflow.com/questions/37835397/use-swift-2-2-in-xcode-8在 StackOverflow 上,使用旧版 Swift 语言版本 YES/NO 。但通过执行 YES 或 No value 对我不起作用?
请帮忙。
I have checked Use Legacy Swift Language Version to options YES/NO please check attached screenshot
![Use Legacy Swift Language Version-YES](https://i.stack.imgur.com/k9VJX.png)
将其添加到您的 pod 文件中:
# Uncomment this line to define a global platform for your project
platform :ios, '9.0'
# Uncomment this line if you're using Swift
use_frameworks!
target 'yourappname' do
pod 'yourpodlists'
post_install do |installer|
installer.pods_project.targets.each do |target|
target.build_configurations.each do |config|
config.build_settings['SWIFT_VERSION'] = '2.3' ## or '3.0'
end
end
end
end
再次运行 pod-install。清理你的项目cdm + alt + shift + k
。再次清洁使用cmd + shift + k
。重新启动 Xcode。建造。现在应该可以了。
如果您不使用 cocoapods,您应该可以通过设置 Compiler Version 属性来解决此问题Use Legacy Swift Language Version
从未指定到是或否。
项目或库的构建设置 ->
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)