Reputation: 611
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
Upvotes: 13
Views: 6088
Reputation: 14013
So if you select your test target under the general tab, you should see a testing section and a "Host Application" prompt with it. If you select the field to the right, you should be able to select your host application from none to your host.
Upvotes: 1
Reputation: 7246
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 .
Upvotes: 25