我在纯 Objective C 项目中使用 Xcode 8.3 时遇到以下错误。
我无法找到解决方案,我的构建设置中没有快速参数,而且我也无法在网上找到任何解决方案。
有任何想法吗?几天前构建得很好,我能看到的唯一区别是 xcode 更新了。
"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.
因此,答案是转到构建设置并单击左上角的 + 图标(如下面的屏幕截图所示)。然后选择添加用户定义的参数SWIFT_VERSION
和一个值3.0
。构建应用程序,它应该运行良好。
我还在我的 Pod 文件中添加了以下内容,以自动对 pod 依赖项构建设置执行相同的过程,尽管仅此并不能解决问题:
post_install do |installer|
installer.pods_project.targets.each do |target|
target.build_configurations.each do |config|
config.build_settings['SWIFT_VERSION'] = '3.0'
end
end
end
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)