Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Download Xcode documentation sets manually [closed]

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

like image 223
rein Avatar asked Jul 15 '09 12:07

rein


1 Answers

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.
like image 70
Amir Kh. Avatar answered Oct 18 '22 20:10

Amir Kh.