In my case I got this error when I renamed a ViewController name using Refactor. The view controller name occurrences were changed but the real file not.
I tried to do what @ajji said but it didn't work. So I changed the name of the real file. After that all worked like a charm