简体   繁体   English

Xcode 6.2 无法下载文档集,抱怨它们“不受信任”

[英]Xcode 6.2 fails to download docsets, complains they're “untrusted”

The docsets I seek are Xcode 6.2 and iOS 8.2 .我寻求的文档集是Xcode 6.2iOS 8.2 The machine is running an old macOS and can't be upgraded.机器运行的是旧版 macOS,无法升级。 Every time I click on offered items under "Preferences->Downloads->Documentation" I see the progress bar showing my request is acknowledged but then it halts halfway with the alert Could not download and install Xcode 6.2.每次我点击“首选项->下载->文档”下提供的项目时,我都会看到进度条显示我的请求已被确认,但随后中途停止并显示无法下载和安装 Xcode 6.2的警报 The package “DevToolsDocset.pkg” is untrusted.包“DevToolsDocset.pkg”不受信任。 I tried setting the date several years back but got another more verbose and less helpful alert message.我尝试在几年前设置日期,但收到了另一条更冗长且不太有用的警报消息。

"Untrusted package" alert (imgur) “不受信任的包”警报(imgur)

So, do there exist direct download links for Xcode 6.2 and iOS 8.2 docsets?那么,是否存在 Xcode 6.2 和 iOS 8.2 文档集的直接下载链接? What's a workaround to get them?获取它们的解决方法是什么?

The solution came by itself quite unexpectedly so I'm sharing my trial and error experience:解决方案本身出乎意料,所以我分享我的试错经验:

  1. Under Preferences->Downloads->Documentation click on any link to start the download.Preferences->Downloads->Documentation 下点击任何链接开始下载。
  2. Launch Disk Utility .启动磁盘工具 When the alert pops up watch closely for a mounted disk image to appear at the left in the source list box.当警报弹出时,请密切注意安装的磁盘映像是否出现在源列表框中的左侧。 At this point you may quit Xcode.此时您可以退出 Xcode。
  3. While in Disk Utility : with the mounted disk image icon and its hierarchy expanded hover over the greyed out icon of the displayed media, highlight it and choose the "Mount" command from the "File" dropdown menu.在“磁盘工具”中:将安装的磁盘图像图标及其层次结构展开后,将鼠标悬停在显示媒体的灰色图标上,突出显示它并从“文件”下拉菜单中选择“安装”命令。
  4. The Disk Image Mounter window opens: it will contain the docset's package. Disk Image Mounter 窗口打开:它将包含文档集的包。 Click on it to install and either make the certificate trustable (under View certificate ) or hit Continue .单击它进行安装并使证书可信(在View certificate 下)或点击Continue The docset file will be installed to the root of your volume at / docset 文件将安装到您卷的根目录/
  5. You now may safely copy the docset from / to /Applications/Xcode.app/Contents/Developer/Documentation/DocSets by simply dragging over existing objects and replacing with the dragged docset upon the prompt.您现在可以安全地将文档集从/复制到/Applications/Xcode.app/Contents/Developer/Documentation/DocSets,方法是简单地拖过现有对象并根据提示替换为拖拽的文档集。
  6. Launch Xcode .启动Xcode The documentation will now be available.该文档现在将可用。 Repeat steps 1-5 for every docset you need.为您需要的每个文档集重复步骤 1-5。
  7. Eject the docset's disk image in Disk Utility .Disk Utility 中弹出文档集的磁盘映像。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM