Why does Xcode occasionally go unresponsive?

I'm building a React Native project and it seems that at least once a week when I start my project from Visual Studio Code it gets stuck building. Then when I try and open the project in Xcode it gets stuck in the infinite loading screen like the attached image.

I end up having to delete and reinstall Xcode, which takes a good amount of time since it's such a large application. What could be going on here? Is there a way I can troubleshoot this without reinstalling Xcode every time, perhaps a way to clean the build cache without opening the project in Xcode?

Post not yet marked as solved Up vote post of christiannc Down vote post of christiannc
1.3k views

Replies

Hi christiannc

The next time you encounter Xcode hanging/unresponsive, please capture a spindump [1] and a sysdiagnose. Then file a feedback report with both attached so the Xcode team can investigate.

Xcode does store cached data at ~/Library/Developer/Xcode/DerivedData. You can try deleting that directory to see if it resolves the hang. But please do file the feedback first!

[1] To capture a spindump, launch terminal and run sudo spindump. Be sure to run spindump while the hang/freeze is ongoing. The spindump will be saved at /tmp/spindump.txt.

  • Thanks for the reply! I've tried deleting that folder, but unfortunately, that doesn't help. Xcode still hangs when opening the project. I have been submitting crash reports, but I've never been reached out to so that's why I'm posting here.

  • Can you share any of the feedback IDs? You may also want to consider contacting Developer Technical Support if this is a high priority issue.

Add a Comment