I was trying to convert syntax of old Swift project to new one as per few suggestion on Stack Overflow I tried converting it through Edit > Convert > To latest Synta
Just remove inactive file(deleted file) from Build phases
then
Clean Xcode. (cmd+shift+k)
Just had the same issue. For me it was because I had renamed some of the project directories. I had a ton of red files in my project navigator. To solve, follow these steps:
In my case I deleted few files from project and when try to commit the code, the files was showing there . To solve this issue. 1. Open terminal 2. Type git clean -n // it will show you list of files which are deleted from project but still are saved somewhere 3. Type git clean -f // All unwanted files will be removed
I had this error when Xcode found two .swift files with same name. Rename one of them and build again.
In my case I copied a core data entity and only renamed the entity but not the class. So go to your xcdatamodel and select the enitity > rename also the class name
In my case swift development snapshot was selected instead of xcode 9.2. here are the steps and image.
Note: If no toolchain found in your xcode than download from Here and install it. (after installation restart xcode). Happy Coding!!!