xcode 8快速更新,错误"使用Legacy Swift语言版"

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值,它对我不起作用?

请帮忙.

我已选中使用Legacy Swift语言版本选项是/否请查看附带的屏幕截图 使用Legacy Swift语言版本 - 是

使用Legacy Swift语言版本 -  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 来解决此问题.

构建项目或库的设置 - >

在此输入图像描述

  • 我检查了你的意见.使用从未指定的Legacy Swift语言版本到是或否.-我尝试了这一步但仍然给出了编译错误 (3认同)