使用第三方下载工具下载Xcode模拟器并进行安装

For faster connection speed and more flexibility.

Steps

  1. 从命令行方式启动xcode: /Applications/Xcode.app/Contents/MacOS/Xcode
  2. 打开prefrences->components,开始下载模拟器
  3. 然后取消下载,没错,就是取消
  4. You will get a message like this: 2015-11-23 17:10:01.906 Xcode[30803:2505495] DVTDownloadable: Download Cancelled. Downloadable: https://devimages.apple.com.edgekey.net/downloads/xcode/simulators/com.apple.pkg.iPhoneSimulatorSDK8_3-8.3.1.1428621365.dmg.
  5. Quit Xcode
  6. Use your favorite download tool with the link in that message in step 3
  • This is what I use: (5 concurrent connection) aria2c -x 5 link_to_the_file
  1. Have Fun!

Wait! How can I install this?

By moving the file to ~/Library/Caches/com.apple.dt.Xcode/Downloads

  • You can use Finder by open ~/Library/Caches/com.apple.dt.Xcode/Downloads
  • Or just mv file ~/Library/Caches/com.apple.dt.Xcode/Downloads

And open the Downloads tab in Xcode's Preferences, 【切记:一定是Downloads】

  • the progress bar of the item you just download should be 80% filled
  • you should be able to click that download button to install the file

Why did I need it?

I am in China right now and when downloading in Xcode(no concurrent downloading), the download speed sucks! I would like to use aria2 to speed up the downloading process of the simulator(s).

How slow was the connect using Xcode and how fast was it when using aria2?

  • Xcode: 150KB -> 300KB
  • aria2: 2.7MB (consistenly), which is the maximum downloading speed of my cable

Why aria2?

  • Concurrent connections
  • Resuming unfinished downloads

References

  • https://forums.developer.apple.com/message/51550#52580 where I found out ~/Library/Caches/com.apple.dt.Xcode/Downloads

你可能感兴趣的:(使用第三方下载工具下载Xcode模拟器并进行安装)