Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Converting to Swift 3 error: "Convert to Current Swift Syntax Failed Could not find test host for..."

When I try to run my project that ran perfectly before upgrading to Xcode 8 I keep getting the error

“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.

After trying to convert to swift 3.0 i continually get the error:

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)

I've tried converting another project to swift 3 and it worked perfectly fine, but this one will not work. All of the locations of the products are set up the same as how the ones in the working project are I'm confused to why i keep getting this error

like image 300
Chris Hutchison Avatar asked Sep 16 '16 01:09

Chris Hutchison


1 Answers

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 .

Build again and it will work fine .

like image 189
Shrawan Avatar answered Nov 14 '22 09:11

Shrawan