Download Xcode documentation sets manually [closed]

断了今生、忘了曾经 提交于 2019-12-03 08:14:26

问题


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


回答1:


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.



回答2:


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.




回答3:


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




回答4:


Found what I was looking for:

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



来源:https://stackoverflow.com/questions/1131119/download-xcode-documentation-sets-manually

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!