I am getting the following error when building in Xcode 10.0 with swift 4.2:
Had the same problem with swift files. Select files that are not recognised and Delete with Remove Reference option. Right click in the folder and Add files again.
Remove Reference