My project worked fine, but after I changed to the last commit Xcode is showing me the strange error message:
Build service could not create build operation: unknown error while handling message: unknownSession
It indexes the files for a few hours and after that is finished the build fails also because of this strange bug.
For myself, I solved it by deleting the code from my pc completely and fetching it from my GitHub repository again. When I build now it works. The code has not changed but I guess Xcode has some strange bugs.