Xcode 13.3 Hangs when run on physical device

After updating to Xcode 13.3, when building for a physical device, the build process hangs at the very end.

The number inside the circle disappears and the Xcode hangs. The IDE is still responsible but when I hit the stop button, to stop the build since it never ends, the Xcode does nothing? Then I try to close the Xcode I get the warning that there is a running task in progress, then it hangs and I need to force quit to make it work.

On simulator everything works as expected. Updated to the latest macOS yesterday hoping for the issue to be resolved but with no avail.

Why is this happening?

I have the same issue.

I have the same issue on all of my devices.

Same here with my physical device.

Same here, not only on physical devices, but trying to built our project from the terminal also hangs. This is a huge problem for our CI workflow at the moment, we were forced to downgrade Xcode in order to work around this.

Same happens for me since Xcode 13.3 and even on Xcode 13.3.1. The only workaround is to wait like 2 hours for the build to actually finish.

The same issue is happening with one of my projects, It runs fine on the simulator but it gets stuck when I try to run on a physical device or press CMD + B in Xcode 13.3.1

Same happens to me for Xcode 13.3.1. Any update on this? It's becoming an issue for most of us.

Exactly the same problem here. I openned a thread here https://developer.apple.com/forums/thread/704607. And I do think it's a duplicate here.

I worked arround by working on simulator and downgrading to Xcode 13.2.1 to archive but I cannot build on real device to access features like camera or push notification (from out backoffice).

I narrowed down the problem to a custom struct that a members is of another custom that has another custom structs as a member. Using only build in types compiles ins seconds. Using my custom types jumps to 10 minutes and I removed a lot of my code for this test. The more I look at it the more I think the compiler struggle to order the files for compilation/linking. I am not an expert in swift nor in compilation but if I had clues of what is happening I could spend time to refactor my code to ease the compiler work but it just hangs for hours before succeeding.

Hope an apple dev will see those message an take an action to correct it.

btw: there is no such compile time for simulator (using an intel mbp)

EDIT: if an apple dev passes by I can provide some more information or code

Xcode 13.4 seems to solve this issue!

Xcode 13.3 Hangs when run on physical device
 
 
Q