26

I upgraded to Xcode 8 and now I really regret it. I'm trying to download Xcode 7.3.1 here: https://developer.apple.com/download/more/

It is a 4.8 GB file.

After three attempts - the download appears to finish around the 1-2 GB mark - and then I can't open or resume the download:

enter image description here

How do I download this without the download being disrupted? Is there another place to download older version of Xcode?

dr.nixon
  • 5,818
  • 3
  • 18
  • 25
etayluz
  • 393
  • That's the correct location to get the download. Are you sure you have enough free space on your Mac and that your network connection is working? – fsb Sep 15 '16 at 21:08
  • Are you able to mount the .dmg file directly into Disk Utility? – OzzieSpin Sep 15 '16 at 21:10
  • Positive on both. It's not a great connection - but it's working. I would think there should be a way to resume a download too. – etayluz Sep 15 '16 at 21:10
  • fbara, that has nothing to do with the available space, the dmg is corrupted. Did you open it from the directory it was downloaded? – OzzieSpin Sep 15 '16 at 21:11
  • I sure did. I downloaded twice - once it cam out at around 600MB - the second time it ended at 1.8GB - it just never finished downloading but it pretended like it did. – etayluz Sep 15 '16 at 21:12
  • try with either Axel, or wget. both will require the use of home-brew. – OzzieSpin Sep 15 '16 at 21:12
  • I tried 'wget http://adcdownload.apple.com/Developer_Tools/Xcode_7.3/Xcode_7.3.dmg' doesn't work at all – etayluz Sep 15 '16 at 21:18
  • 1
    How long does your download take? If your connection is really slow, then it might be that your session was closed, before the file finished downloading. So you could try to browse in the developer section form time to time while downloading to keep the session alive. – t.niese Sep 16 '16 at 09:15
  • 1
    I finally managed to download it late at night. I'm on a 6MBpS connection. It took 3 hours and 20 minutes. I also thought it was a session issue where I had to go back into the developer portal every hour. But there was no need for it. In any case, there should be a way to resume a paused download IMO. – etayluz Sep 16 '16 at 14:22
  • There is also http://xcodereleases.com. – Iulian Onofrei Apr 11 '18 at 09:51
  • For those looking for the list of possible XCode downloads: https://stackoverflow.com/a/10335943/3196753 – tresf May 22 '19 at 02:31

1 Answers1

29

Try Google Chrome and curl:

  • Open Terminal
  • Open Google Chrome and go to Developer Apple downloads.
  • Scroll down to Xcode 7.3.1 and click the + sign.

    enter image description here

  • open Google Chrome's Developer Tools (altcmdI) > Network panel
  • Click on Xcode 7.3.1.dmg to start the Xcode download
  • Right-click Xcode 7.3.1.dmg in the network panel > Copy as cURL

    enter image description here

  • Stop the Xcode 7.3.1.dmg download on Google Chrome's Downloads page or in the status bar
  • Paste the content of the pasteboard to the Terminal window with cmdV and add -o Xcode7.3.1.dmg. Then hit the enter key.

    Example:

    curl 'http://adcdownload.apple.com/Developer_Tools/Xcode_7.3.1/Xcode_7.3.1.dmg' -H 'Accept-Encoding: gzip, deflate, ... <redacted> ...; as_dc=nwk; ADCDownloadAuth=<redacted>' -H 'Connection: keep-alive' --compressed -o Xcode7.3.1.dmg
    

    If you add additionally -L -C - at the end (after the suggested -o Xcode7.3.1.dmg), you can resume previous downloads (i.e. download interrupted server-side).

I hope this works for you.

klanomath
  • 66,391
  • 9
  • 130
  • 201
  • 2
    Worked for me! The curl download progress stagnated towards the end, so I stopped the download (Ctrl-C) and ran the same command again but added -C - before the URL (curl -C - <URL from Chrome>) to resume from where the download was stopped. File now completely downloaded =) – CodeMonkey Jun 01 '17 at 07:47
  • 2
    Worked for me, eventually, when downloading Xcode 10.2.1. There were about six or eight interruptions before it finished though. I just kept hitting the up arrow in the terminal and setting it off again.

    Note though that these downloads are likely to be .xip files now. I'd appended "-o Xcode10.2.1.dmg -L -C - " to the command, but my Mac refused to recognise it as a .dmg file because (der) it isn't one! I simply changed the downloaded file's extension from .dmg to .xip, then double-clicked on it in Finder to start the extraction.

    – ChillyPenguin Jul 07 '19 at 01:01
  • This doesn't seem to work anymore: curl: (33) HTTP server doesn't seem to support byte ranges. Cannot resume. – Jaap Weijland Nov 26 '19 at 09:30
  • Following these instructions exactly, I still get the same error shown in the question. With no download interruptions or continuations... It seems like the curl download still needs to be a xip file. The instructions show the filename as dmg several times, but like @ChillyPenguin said -I needed to change it to xip and then the dmg extraction worked, and so did the install – SeanMC Jul 06 '20 at 16:08
  • Can you elaborate how to resume the interrupted download? – emeraldhieu May 11 '22 at 10:03