I am getting the following error when building in Xcode 10.0 with swift 4.2:
In some cases, if you Refactor your existing ViewController files or any other files using right-click -> Refactor option within the Xcode workspace then on compiling this error will come
since the File name is not changed in original place but reference is updated, so in that you need to also manually change the old file to new name.