Xcode 8 Beta - Convert to Current Swift Syntax Failed: Could not find test host
This worked for me:
- Select the Xcode project in the lefthand browser.
- Click on your test target in the Project's
General
tab. - Disclose "Testing". In my project the "Host Application" pulldown button was blank. Select your appropriate host application.
- 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
Xcode - Could not find test host]
- Select the Xcode project in the lefthand browser.
- Click on your test target in the Project's General tab.
- 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
Randomly Choosing an Item from a Swift Array Without Repeating
What Is the Meaning of This Declaration
Cordova: Start Specific iOS Emulator Image
Swift: Declare an Empty Dictionary
How to Change "Initwithnibname" in Storyboard
Watchkit Appicon - the App Icon Set Named "Appicon" Did Not Have Any Applicable Content
Popping and Pushing View Controllers in Same Action
Populating Tableview with Multiple Sections and Multiple Dictionary in an Array in Swift
Capture Metal Mtkview as Movie in Realtime
How to Only Show Bottom Border of Uitextfield in Swift
Bridge Google Drive API to Swift
iOS Documents Directory Size Limit
How to Round the Corners of a Button
Scrollview and Keyboard in Swift
iOS App Submission and Beta Review Process
Xcode - Error Itms-90635 - Invalid MACh-O in Bundle - Submitting to App Store