for me, this issue is caused by my mac disk is full. This information was got by looking into the detail of build log, after navigating to the "Report navigator" in Xcode. there is much more concrete info what failed exactly
Topic:
Developer Tools & Services
SubTopic:
Xcode
Tags: