Project can not run in Xcode 12.4

Hello everyone,
I faced to an issue that I searched and not found. When I want to run my project in Xcode 12.4 first it take too much time then Xcode force quit and after that my Mac restarted automatically finally I can't run my project.
Answered by Claude31 in 661067022
Did you try creating a new project, just empty.
If no crash, that means problem is in your code (unlikely though to cause such a crash)

If it crashes, that probably mean you have an Xcode install problem.
Reinstall.
Accepted Answer
Did you try creating a new project, just empty.
If no crash, that means problem is in your code (unlikely though to cause such a crash)

If it crashes, that probably mean you have an Xcode install problem.
Reinstall.
I created a new empty project. Had no problems until I opened the Add New File dialog. Then get the beach ball cursor. Xcode has been running fine for weeks now. How could it possible just do this? What changed? It has not loaded any of my previous projects when it does this as its a new project.
Determined the problem: WiFi. No, not my home WiFi as I have checked that from multiple sources including speediest.net right on my MacBook Pro. The WiFi itself is not the problem. When WiFi is turned on, Xcode spins the beachball for seemingly random tasks. I noticed this as it tried to do a code completion which is when I switched on WiFi. Lo and behold: no problems with Xcode. As soon as I switched WiFi back on: spinning beachball.
Project can not run in Xcode 12.4
 
 
Q