Downloading Xcode with wget or curl
For Chrome,
- Install cookies.txt Chrome extension
- Login to Apple Developer site and get the url for downloading
- Run cookies.txt extension and download cookies.txt file
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-rightMenu
icon ->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.