rak*_*kex 19 compiler-errors swift swift3 xcode8
当我打开我的项目到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
Run Code Online (Sandbox Code Playgroud)
参考StackOverflow 上的类似帖子,使用Legacy Swift语言版本是/否.但是,通过做YES或No值,它对我不起作用?
请帮忙.
Dav*_*eek 16
将其添加到您的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
Run Code Online (Sandbox Code Playgroud)
再次运行pod-install.用cdm + alt + shift + k.清理你的项目.再次使用清洁cmd + shift + k.重启Xcode.建立.现在它应该工作.
如果您没有使用cocoapods,您应该能够通过将Compiler Version属性Use Legacy Swift Language Version从未指定设置为Yes或No 来解决此问题.
构建项目或库的设置 - >
| 归档时间: |
|
| 查看次数: |
21858 次 |
| 最近记录: |