手动下载Xcode文档集

由于我不知道的原因,Xcode无法从服务器下载文档集.

有没有办法从URL手动下载这些文档集,然后Xcode的Core Reference Library解压缩它们?

编辑:

找到我正在寻找:

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

解决方法

对于Xcode 7.0或者更新版本,您应该按照以下步骤手动下载和安装文档集:

首先你应该在下面的链接中找到你正确的项目:
https://developer.apple.com/library/downloads/docset-index.dvtdownloadableindex

例如:

<!-- 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 -->

>从源字符串下载文件.在我们的例子中:https://devimages.apple.com.edgekey.net/docsets/20150916/031-34987-A.dmg
>使用以下结构重命名下载的文件

“identifier string”“ – ”“version string”“.dmg”

在我们的例子中:com.apple.adc.documentation.iOS-90.9.dmg

>然后把它放到:〜/ Library / Caches / com.apple.dt.Xcode / Downloads /

如果没有下载文件夹,请创建它.
我建议您删除.dvtdownloadableindex扩展名的所有文件(如果有的话).

>转到InstallPrefix字符串文件夹并删除存在相关的文档(如果有的话).

在我们的示例中,文件夹是$(HOME)/ Library / Developer / Shared / Documentation / DocSets,它指向〜/ Library / Developer / Shared / Documentation / DocSets.然后从那里删除com.apple.adc.documentation.iOS.docset文件.

(在某些情况下,$(DEVELOPER)指的是/Applications/Xcode.app/Contents/Developer).

>打开Xcode,转到首选项….在下载选项卡中,只需单击文档的下载箭头.你发现Xcode只是传递下载进度并安装文档.

相关文章

当我们远离最新的 iOS 16 更新版本时,我们听到了困扰 Apple...
欧版/美版 特别说一下,美版选错了 可能会永久丧失4G,不过只...
一般在接外包的时候, 通常第三方需要安装你的app进行测...
前言为了让更多的人永远记住12月13日,各大厂都在这一天将应...