My connection isn’t reliable. I would be lucky to download ~300MB of data without getting disconnected (and let’s not forget I also have a slow connection). This is a problem when you’re downloading documentations with XCode since it doesn’t seem to be able to resume downloads. Fortunately, the following steps can be used as a workaround in getting the necessary documents:

  1. Go to the XCode Documentation preferences and you should see something like:

    Screenshot of XCode 4 Documentation Preferences

  2. Click on the document that you would like to download (ie iOS 4.3 Library) and click on the show doc set info button .
    You should see something like:

    Screenshot of Documentation Preferences showing docset info

  3. Make a note of the document file size, version and then copy the Feed URL and paste it to Safari or any web browser/application that can read XML (as of June 2011, XCode 4 is looking for iOS 4.3 Library v 38.55 having anย  approximate size of 459MB). This is important as downloading a different version of the docset may not be readable by XCode 4. Download the XAR file from Safari or copy the URL and use your favorite download manager to get the file.

    Screenshot of Safari displaying the Feed URL. Note the two versions of the iOS 4.3 Library

  4. Once the file has been downloaded, you can:
    1. Use Pacifist to extract the content of the XAR file to the following folder: /Developer/Documentation/DocSets
      -or-
    2. Copy the XAR file to /Developer/Documentation/DocSets and launch a terminal window and make your way to the location and use: sudo xar -xf filename.xar to extract the files. Delete/backup the XAR when the operation has been completed.

    If XCode was running while you were doing this, relaunch XCode otherwise the docset may not appear.

  5. The docset should now appear in XCode. If XCode isn’t listing the docset, it is possible that you have downloaded a different version that XCode could not read or it requires the file owner to be _devdocs. To change the file owner, launch a terminal window, make your way to the previous location and use: sudo chown -R -P _devdocs filename.docset or since all docsets are owned by _devdocs anyway: sudo chown -R -P _devdocs *.docset

    Screenshot of XCode's Document Organizer

This method can also be used to download and overwrite previous docset version but before proceeding, please make a backup of the working documentation before overwriting.