Xcode 8 Beta - Convert to Current Swift Syntax Failed: Could Not Find Test Host

Xcode 8 Beta - Convert to Current Swift Syntax Failed: Could not find test host

This worked for me:

  1. Select the Xcode project in the lefthand browser.
  2. Click on your test target in the Project's General tab.
  3. Disclose "Testing". In my project the "Host Application" pulldown button was blank. Select your appropriate host application.
  4. Try building your test target now. If that succeeds then converting syntax should as well.

I had this problem after installing the Xcode 8 beta so I assume this is related.

Picture Credit to @karthikkck
Sample Image

Xcode - Could not find test host]

  1. Select the Xcode project in the lefthand browser.
  2. Click on your test target in the Project's General tab.
  3. Under "General" select your appropriate host application under "Testing".

Convert to current swift syntax failed

OK I literally just reset my git again and closed my project and reopened it and then it worked... Silly Xcode

Xcode internal errors when testing with swift

So I guess for now there is no good solution to this problem.
It seems to be caused by crashes of SourceKit.

Fortunately the problem is not solved (partially) on my end.

I decided to make this answer a compilation of different things to try when experiencing this:

  • Restart - try restarting both Xcode and the PC
  • Clean the project (shift-command-K)
  • Build your code, I noticed that sometimes it occurs when you just have unrelated build errors somewhere in your project - make sure it builds
  • Delete the DerivedData folder rm -Rf ~/Library/Developer/Xcode/DerivedData/, but you can also delete it from Xcode
  • Delete the cache rm -Rf ~/Library/Caches/com.apple.dt.Xcode - Currently this seems to help the most

I will edit and add more solutions if I find any



Related Topics



Leave a reply



Submit