Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Xcode 12.3 keeps freezing

Tags:

xcode

macos

I updated to the latest AppStore release of Xcode (12.3, 12C33). It worked fine for an hour or two. After that it started to constantly freeze after being open for a few seconds to minutes.

I've tried the following, all without success so far:

  • restart macOS
  • clear derived data
  • tried with different projects
  • updating to latest macOS 11

Any other ideas or suggestions how to fix this?


Update

I can confirm that this is fixed in Xcode 12.5

like image 215
benrudhart Avatar asked Dec 15 '20 16:12

benrudhart


People also ask

Why does Xcode hang on my Mac?

Xcode may hang if the host Mac is connected to an iOS device which has one or more companion watches. The hangs occur when the watches aren't fully prepared for development, or if they are experiencing poor wireless connectivity. (72490921) (FB8945320) Workaround: Power off the watches, or unpair them from the iPhone. Force-quit Xcode.

Is Xcode still useable on a MacBook Air?

It has never been a rocket on my simple Macbook Air, but it's been very useable. However it is extremely slow now, to a point where it's very frustrating and dissapointing. For me, Xcode (Version 12.3 (12C33)) was beach-balling every 5 minutes as well.

How to resolve device-preparation errors in Xcode?

If Xcode presents device-preparation errors, follow the guidance in the error message to resolve the error. Once Xcode finishes preparing the iOS device and its companion watches for development, repeat steps 5 through 8 for each remaining iOS device and its companion watches until you verify that Xcode has prepared all devices for development.


5 Answers

I found an answer by Darr on the question "Xcode freezes after upgrade to 12.3" on Apple's developer forums that worked for me:

Unpairing my device connected via network and using only lightning cable seems to have resolved the issue for me.

Xcode > Window > Devices and Simulators > device > Connect via network

like image 116
wikk Avatar answered Oct 11 '22 05:10

wikk


After going mad, I fixed this by removing all devices from Devices and Simulators (I had connect via network activated).

For now, it's working fine.

like image 27
Andrei Matei Avatar answered Oct 11 '22 04:10

Andrei Matei


Power off your Apple Watch

Xcode may hang if the host Mac is connected to an iOS device which has one or more companion watches. The hangs occur when the watches aren't fully prepared for development, or if they are experiencing poor wireless connectivity. (72490921) (FB8945320)

Workaround: Power off the watches, or unpair them from the iPhone.

Xcode 12.4 Release Notes

You can force Xcode to freshly prepare a watch for development using these steps:

  1. Force-quit Xcode.

  2. Power-off and disconnect all iOS device from the Mac.

  3. Reboot the Mac.

  4. Launch Xcode, close all projects, and open the Devices and Simulators window.

  5. Power-on and unlock an iOS device and its companion watchOS devices by entering the passcode as required.

  6. Plug the iOS device into the Mac using USB cable.

  7. Check each iOS device and each watch for any pairing request and approve the requests.

  8. Monitor the status of device preparation in the Devices and Simulators window. If Xcode presents device-preparation errors, follow the guidance in the error message to resolve the error.

Once Xcode finishes preparing the iOS device and its companion watches for development, repeat steps 5 through 8 for each remaining iOS device and its companion watches until you verify that Xcode has prepared all devices for development. You may now open your Xcode projects and resume development.

like image 11
hstdt Avatar answered Oct 11 '22 06:10

hstdt


I've been having the same problem. I had an iOS device connected via USB, unplugged it and it un-froze. Then I continued to have issue requiring force close each time.

I then clear derived data and things have been fine. I opened a StickerPack project and also had the same issue. Clearing DerivedData also fixed it.

Clear Derived Data:

  1. Xcode pulldown menu > Preferences > Locations tab
  2. Click the little arrow next to the path under Derived Data.
  3. Delete the entire folder for you project. It will look like "MyAppName-bwonddotztrgkkfexrjxoncvmjit"

See this explanation about whether it's safe to delete DerivedData for your project.

like image 8
KevinS Avatar answered Oct 11 '22 05:10

KevinS


I had the same problem with appstore version and someone advised to install from site, now it works fine. https://developer.apple.com/download/more/

like image 2
zhussupali Avatar answered Oct 11 '22 05:10

zhussupali