iOS開發肯定離不開開發文檔,蘋果有在線幫助文檔,xCode其實可以下載模擬器文檔和iOS8.1文檔的,不過下載的速度實在不敢恭維,而且比較頭疼的是不顯示下載進度條的,蘋果的開發文檔都是放在)/應用程序/Xcode.app/Contents/Developer/Documentation/DocSets路徑下,該路徑下可以看到三個文件,xCode 6.1文檔(com.apple.ADC_Reference_Library.DeveloperTools.6_0_1.docset),iOS8.1文檔(com.apple.adc.documentation.AppleiOS8.1.iOSLibrary.docset),OS X文檔(com.apple.adc.documentation.AppleOSX10.10.CoreReference.docset).
首先看一下正常下載的方法,這種方式很慢,打開xCode,在xCode->Preferences中可以看到以下效果:
我們需要研究以下這三個下載之后的文件的位置,在應用程序中找到xCode.app,右擊選擇顯示包內容:

詳細路徑:

文件詳細顯示,com.apple.adc.documentation.AppleiOS8.1.iOSLibrary.docset選中項就是要安裝的文檔:

現在的就是怎么才能最快的下載iOS8.1開發文檔,這個時候有一個網址是必須要知道的,蘋果的各種開發文檔如果變更都會更新這個網站,
https://developer.apple.com/library/downloads/docset-index.dvtdownloadableindex,一直往下拖,到最后可以發現一段描述:
<!-- START iOS 8.1 -->
<dict>
<key>fileSize</key>
<integer>426419333</integer>
<key>identifier</key>
<string>com.apple.adc.documentation.AppleiOS8.1.iOSLibrary</string>
<key>name</key>
<string>iOS 8.1</string>
<key>source</key>
<string>https://devimages.apple.com.edgekey.net/docsets/20141020/031-07735-A.dmg</string>
<key>userInfo</key>
<dict>
<key>ActivationPredicate</key>
<string>$XCODE_VERSION >= '6.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.1413843168</string>
</dict>
<key>RequiresADCAuthentication</key>
<false/>
<key>Summary</key>
<string>My description of content</string>
</dict>
<key>version</key>
<string>53.13</string>
</dict>
<!-- END iOS 8.1 -->
https://devimages.apple.com.edgekey.net/docsets/20141020/031-07735-A.dmg就是我們需要下載的文件,大概在一個小時左右,速度一般為40k,快慢不一定,不過相對於xCode的蝸牛速度好多了~下載完成安裝之后將默認DocSets下面的com.apple.adc.documentation.AppleiOS8.1.iOSLibrary.docset,將下載安裝之后的拖進去,然后重啟xCode,這個時候點擊Help:

進入之后可以iOS8.1的文檔,可以看到一個是音頻視頻,Sample Code存放的是Demo,Guides存放的是基礎概念和用法:

General目錄下有一個Guides目錄下可以看到馬上着手開發iOS應用程序:

User Experience用戶體驗下面可以看到一些UI頁面的設計知識:
至此關於iOS8.1文檔安全遇到的各種問題都已經解決,也折騰了不少時間,如果有問題可以隨時與我聯系,如果感覺文章不錯,給個推薦,如果覺得不錯可以通過一下網址關注http://www.cnblogs.com/xiaofeixiang/~祝大家周末愉快,題外話,蘋果關於文檔的這個事情是出個岔子的,就是將xCode和OS X的文檔地址給成了一樣的,大概是去年十月份的時候,詳細信息可以參考:http://bbs.feng.com/read-htm-tid-8486651.html
