2015-04-04 39 views

回答

2

我找到了一种方法来安装它们。它工作正常,在Xcode 7.0:

  1. 首先,你应该找到在以下链接你的正确项: 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 --> 
  • source字符串下载文件。在我们的例子:

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

    在我们的例子:https://devimages.apple.com.edgekey.net/docsets/20150916/031-34987-A.dmg

  • 使用以下结构重命名下载的文件
    com.apple.adc.documentation.iOS-90.9.dmg

  • 然后将其置于:
    ~/Library/Caches/com.apple.dt.Xcode/Downloads/
  • 我建议您删除.dvtdownloadableindex扩展名(如果有的话)的所有文件。

    1. 转至InstallPrefix字符串文件夹并删除存在相关docset(如果存在)。

    在我们的例子中,文件夹是$(HOME)/Library/Developer/Shared/Documentation/DocSets是指~/Library/Developer/Shared/Documentation/DocSets.然后从那里取出com.apple.adc.documentation.iOS.docset文件。

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

    1. 打开Xcode,进入偏好...。在“下载”选项卡中,只需单击文档的下载箭头即可。您会发现Xcode只是传递下载进度并安装文档。
    +0

    谢谢,工作完美! – phatmann 2015-11-16 11:55:28