ios – 转换为Swift 3错误:“转换为当前Swift语法失败无法找到测试主机…”

当我尝试在升级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.

尝试转换为swift 3.0后,我不断得到错误

Convert to Current Swift Syntax Failed Could not find test host for
CastleTests: TEST_HOST evaluates to: (location of my file for my project and test folders)

我已经尝试将另一个项目转换为swift 3并且它工作得非常好,但是这个项目不起作用.产品的所有位置设置与工作项目中的位置相同我很困惑为什么我不断收到此错误

解决方法

i)Select every target of Test in Project. ii)Navigate to General tab.
iii)Host application name is empty,so Update with appropriate host name .

再次构建,它将正常工作.

相关文章

UITabBarController 是 iOS 中用于管理和显示选项卡界面的一...
UITableView的重用机制避免了频繁创建和销毁单元格的开销,使...
Objective-C中,类的实例变量(instance variables)和属性(...
从内存管理的角度来看,block可以作为方法的传入参数是因为b...
WKWebView 是 iOS 开发中用于显示网页内容的组件,它是在 iO...
OC中常用的多线程编程技术: 1. NSThread NSThread是Objecti...