14

For reasons unknown to me, Xcode fails to download the documentation sets from the server.

Is there a way to download these documentation sets manually from a URL and then have Xcode's Core Reference Library unpack them?

EDIT:

Found what I was looking for:

http://learning2code.blogspot.com/2008/05/download-xcode-docsets-to-your-hard.html

rein
  • 32,967
  • 23
  • 82
  • 106

4 Answers4

9

For Xcode 7.0 and maybe newer versions you should follow these steps to download and install documentation sets manually:

  1. At first you should find your proper item in the below link: https://developer.apple.com/library/downloads/docset-index.dvtdownloadableindex

For example the following:

<!-- START iOS 9 doc set -->
<dict>
  <key>fileSize</key>
  <integer>1065107366</integer>
  <key>identifier</key>
  <string>com.apple.adc.documentation.iOS</string>
  <key>name</key>
  <string>iOS 9.0 Documentation</string>
  <key>source</key>
  <string>https://devimages.apple.com.edgekey.net/docsets/20150916/031-34987-A.dmg</string>
  <key>userInfo</key>
  <dict>
    <key>ActivationPredicate</key>
    <string>$XCODE_VERSION &gt;= '7.0' &amp;&amp; $XCODE_VERSION &lt; '7.1'</string>
    <key>Category</key>
    <string>Documentation</string>
    <key>IconType</key>
    <string>IDEDownloadablesTypeDocSet</string>
    <key>InstallPrefix</key>
    <string>$(HOME)/Library/Developer/Shared/Documentation/DocSets</string>
    <key>InstalledIfAllReceiptsArePresentOrNewer</key>
    <dict>
      <key>com.apple.pkg.7.0.iOSDocset</key>
      <string>10.9.0.0.1.1442278660</string>
    </dict>
    <key>RequiresADCAuthentication</key>
    <false/>
    <key>Summary</key>
    <string>My description of content</string>
  </dict>
  <key>version</key>
  <string>90.9</string>
</dict>
<!-- END iOS 9 doc set -->
  1. Download the file from source string. In our example: https://devimages.apple.com.edgekey.net/docsets/20150916/031-34987-A.dmg

  2. Rename the downloaded file using following structure:

"identifier string" + "-" + "version string" + ".dmg"

In our example:
com.apple.adc.documentation.iOS-90.9.dmg

  1. Then place it to:
    ~/Library/Caches/com.apple.dt.Xcode/Downloads/

If there is no Download folder, create it.
I suggest you to remove all files with .dvtdownloadableindex extension (if any exists).

  1. Go to InstallPrefix string folder and remove existence related docsets (if any exists).

In our example the folder is $(HOME)/Library/Developer/Shared/Documentation/DocSets which refers to ~/Library/Developer/Shared/Documentation/DocSets. Then remove the com.apple.adc.documentation.iOS.docset file from there.

(In some cases, $(DEVELOPER) refers to /Applications/Xcode.app/Contents/Developer).

  1. Open Xcode, go to preferences... . In the Download tab, simply click download arrow for the document. You find that the Xcode just pass the download progress and install the document.
Amir Kh.
  • 446
  • 4
  • 11
  • That failed at the first step - follow your link. The Source listed on everything is http://developer.apple.com/none.dmg, which takes me to a broken link page. I thought maybe I needed to sign in with my Apple ID, but that did not alter the contents of the XML returned, still all sources are none.dmg. – Jay Imerman Oct 18 '15 at 19:59
  • I should add, when I put the URL you listed for iOS 9, that gave me a dmg file to download. So that worked, as a single example. But the first link which is supposed to give us the complete doc set list, all have bogus sources. – Jay Imerman Oct 18 '15 at 20:01
  • Check out all versions and all sources. Maybe you choose a wrong docsets. I think, it returns https://apple.com/none.dmg for some outdated docsets that doesn't exist anymore. – Amir Kh. Oct 27 '15 at 11:24
4

Augmenting the blog post mentioned in the accepted answer here, since its comments are closed:

There's a separate feed for each OS release. You can follow the Snow Leopard documentation at http://developer.apple.com/rss/com.apple.adc.documentation.AppleSnowLeopard.atom

One way to find these URLs is to click the little "i" info icon for each DocSet in Xcode's Preferences -> Documentation -> Documentation Sets.

1

If you are trying to download the iPhone docs you may be using an account that has no access to the docs.

Using Keychain Access, delete the 'connect.apple.com' entry, then attempt to download the docs and enter your iPhone-registered account info. -- Ronald Hayden, Cocoabuilder Xcode Archive

IlDan
  • 6,851
  • 3
  • 33
  • 34
1

Found what I was looking for:

http://learning2code.blogspot.com/2008/05/download-xcode-docsets-to-your-hard.html

rein
  • 32,967
  • 23
  • 82
  • 106