Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4041114
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T12:50:22+00:00 2026-05-20T12:50:22+00:00

I am trying to download Xcode from the Apple Developer site using just wget

  • 0

I am trying to download Xcode from the Apple Developer site using just wget or curl. I think I am successfully storing the cookie I need to download the .dmg file, but I am not completely sure.

When I run this command:

wget \  
   --post-data="theAccountName=USERNAME&theAccountPW=PASSWORD" \  
   --cookies=on \  
   --keep-session-cookies \  
   --save-cookies=cookies.txt \        
   -O - \  
   https://developer.apple.com/ios/download.action?path=/ios/ios_sdk_4.1__final/xcode_3.2.4_and_ios_sdk_4.1.dmg > /dev/null

A file called cookies.txt is created and contains something like this:

developer.apple.com FALSE / FALSE 0 XXXXXXXXXXXXXXXX  XXXXXXXXXXXX
developer.apple.com FALSE / FALSE 0 developer.sessionToken

I’m not completely certain, but I think there should be more to it than that (specifically, an alphanumeric string after sessionToken).

When I try to do the same thing with curl using this:

curl \  
   -d "theAccountName=USERNAME&theAccountPW=PASSWORD" \
   -c xcode-cookie \ 
   -A "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.1) Gecko/20061204 Firefox/2.0.0.1" \
   https://developer.apple.com/ios/download.action?path=/ios/ios_sdk_4.1__final/xcode_3.2.4_and_ios_sdk_4.1.dmg

I get a file called xcode-cookie that contains the same information as the cookies.txt file wget gives me, except that the lines are reversed.

I then tried to download the .dmg file.

Using wget:

wget \
   --cookies=on \
   --load-cookies=cookies.txt \
   --keep-session-cookies \
   http://developer.apple.com/ios/download.action?path=/ios/ios_sdk_4.1__final/xcode_3.2.4_and_ios_sdk_4.1.dmg

This gives me a file called login?appIdKey=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX&path=%2F%2Fios%2Fdownload.action?path=%2Fios%2Fios_sdk_4.1__final%2Fxcode_3.2.4_and_ios_sdk_4.1.dmg
, which is just an HTML page containing the login form for the developer site.

Using curl:

curl \
   -b xcode-cookie \
   -c xcode-cookie \
   -O -v \
   -A "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.1) Gecko/20061204 Firefox/2.0.0.1" \
   https://developer.apple.com/ios/download.action?path=/ios/ios_sdk_4.1__final/xcode_3.2.4_and_ios_sdk_4.1.dmg

Which prints basically the same thing as wget (minus the HTML).

I want to say it has to do with the sessionToken not being in the cookie, but like I said before I am not sure. I even tried exporting the cookies from my browser and following the instructions in the blog post I linked below and several other sites I found while searching for help.

I must be doing something wrong, unless Apple has changed something since Oct. 10 because this guy seems to be to do something right.

Thanks in advance!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-20T12:50:24+00:00Added an answer on May 20, 2026 at 12:50 pm

    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

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Just trying to download it from http://www.asp.net/downloads for the first time. Web Platform Installer
I'm trying to download a favicon from a website using Node.js, but am having
I am trying to download images from the site. The code which I am
I'm trying to use SQL Server 2000 DTS Package to download a file from
I'm trying to use the WebClient class to download a html file from another
Im trying to get my xCode to contain all iPhone sdk's from 4 back
i'm trying to download .zip file from bluehost server to my computer. Like this
I am trying to download Android source code for Contact,Dialer and CallLog applications from
I'm trying to download the following page: http://structureddata.wikispaces.com/Test wget without any option fails: wget
I am trying to download a file from the net and write it to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.