In the beginning you have to be you must check "open using rosetta"
for rosetta
1- open finder
2- go to Application
3- find xcode
4- right clic
5- info
6- check "open using rosetta"
then clear DerivedData
1- open terminal
2- rm -rf ~/Library/Developer/Xcode/DerivedData
3- hit return in your keyboard
close xcode the open it or restart your mac
i think you now better than
and the project run good