I had the same problem just now.
It turned out that I accidentally dragged the project product itself into the "Bundle Copy Resources" section.
So, xcode is trying to build the product recursively, so it can itself recursively add the product itself as a resource.
Extract the product itself from the โBundle Copy Resourcesโ section, which allowed it for me.
source share