Downloading Xcode with wget or curl

For Chrome,

  1. Install cookies.txt Chrome extension
  2. Login to Apple Developer site and get the url for downloading
  3. Run cookies.txt extension and download cookies.txt file
  4. From the cookies.txt download directory, load cookies into wget and start resumable download. For example, to download Xcode_7.dmg, you would run:

    wget --load-cookies=cookies.txt -c http://adcdownload.apple.com/Developer_Tools/Xcode_7/Xcode_7.dmg


Maybe this is the easiest way to use curl:

  • open Google Chrome.app;
  • goto site developer.apple.com;
  • press CMD+SHIFT+J or click top-right Menuicon -> Tools -> Developer Tools;
  • click Network panel;
  • now click Xcode download link at apple.com;
  • you will see one or more request records in the Network panel;
  • right click the latest record, then click Copy as cURL;

Now, you got the curl command for this download link with cookies and other http-requeset-fields, just paste to your terminal and add -o xxx.dmg at the end.