Xcode 12 Taking a Long Time to Expand
Well, this worked for me:
- Download XCode from https://developer.apple.com/download/all/
- Transfer the .xip file to your external SSD.
- Extract/Unzip the Xcode from .xip file there.
- After extracting, transfer the XCode into your Applications Folder.
P.S I successfully installed XCode 13.1 using the above process on my MBA.
P.P.S I had around 37 GB left on my mac (before installing) and used a 2 TB SSD
I have MacBook Air with SSD 120GB, MacOS 12.1, downloaded XCode13.2.xip which is 10GB, and couldn't extract it 5+ hours.
BUT
Later I found out that in System Preferences / Battery / Power Adapter / Prevent Mac from automatically sleeping when the display is off WAS Unchecked, and that cause my Mac go to sleep after 5 minutes when the display went off and did this completely silently because I have SSD.
SOLUTION:
Set System Preferences / Battery / Power Adapter / Prevent Mac from automatically sleeping when the display is off = ON, and after that the xip extraction could finish in 30 minutes. The extracted Xcode folder is now 30GB (18GB on disk).
God Bless
Solution for me:
I have the same issue, unpacking with Archive Utility (The default app with the green logo, idk its English name) the xip file stored on an external ssd, and I was stuck at the end for 2 hours.
I analyzed with cleanmymac (im not sponsored) the space of all my storage, and there was 20gb from nowhere on my computer's ssd. So I looked in the path, and there was Xcode.
With more details:
- Force to quit Archive utility (so it doesn't delete its cache)
- (If you have software that can show you the sizes taking the most place on your storage, use it to find the path), for me the path was
/private/var/folders/41/x4clwyh51x157mh_1ty5c6880000gn/T/com.apple.AUHelperService/85EE5F7B-09FD-4B51-89F1-140FBA71258B/Xcode.app
. It is the path Archive utility stores the file it is unpacking. This path will probably different for everyone, so go to/private/var/folders/
and try to follow the >20gb size hidden somewhere by looking up space of every directories. - When you finally find it, move it to your applications or anywhere you want to.
I am still doing it rn, so when ill have finished to move it, I am not sure of the app's integrity, I will comment my own post to tell how it went
You just take a look at Xcode and you know the whole thing is just wrong in every way; look at Cocoapods and the architecture.... Nothing works..... the release of apps and submission of the IPA files, the signing certificates, etc. Everything about the whole design is wrong... So this XIP extraction taking forever is in keeping with Apple's "wrong" approach.
What worked for me was cooling it down with a fan. As soon as I started using the fan, the CPU usage went way down and the unzipping process went by in a matter of minutes.
Environment:
MBP Late 2017, 16 GB, SSD 1 TB
Monterey 12.4
XCode 13.4
Update via Appstore got stuck, although more than 40 GB hard disk space available.
-
Go to /Applications and move XCode to trash
-
Downloaded XCode from here: https://developer.apple.com/download/all/?q=xcode
Then:
cd /Applications sudo xip -x /Users/$LOGNAME/Downloads/
Took about 10 minutes to extract & verify. After that, start XCode, will again be verified for valid certificates, takes a couple of minutes. After that, you're all set & good to go. Since you didn't remove / delete any XCode related secondary files, all your former projects are still available.
In my case... It took around 9 hours:
➜ ~ cd /Volumes/ADATA\ HD710\ PRO/Applications
➜ Applications time xip -x /Volumes/ADATA\ HD710\ PRO/Documents/Downloads/xCode/Xcode_13.4.1.xip
xip: signing certificate was "Software Update" (validation not attempted)
xip: expanded items from "/Volumes/ADATA HD710 PRO/Documents/Downloads/xCode/Xcode_13.4.1.xip"
xip -x /Volumes/ADATA\ HD710\ PRO/Documents/Downloads/xCode/Xcode_13.4.1.xip 2461.77s user 2212.67s system 14% cpu 9:05:36.61 total