I just had this issue occur randomly. There were no build errors in my code. After swicthing to new simulator & cleaning build folder with no luck, I restarted xCode (11.5), and the issue self-resolved. Anytime you get wierd build failures, restart xCode.