Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 27 You must be signed in to star a gist
  • Fork 8 You must be signed in to fork a gist
  • Save rtrouton/f03fdca4b847ef4077b7979e7f1a5711 to your computer and use it in GitHub Desktop.
Save rtrouton/f03fdca4b847ef4077b7979e7f1a5711 to your computer and use it in GitHub Desktop.
How to Download iOS Simulator (Xcode) in Command Line and Install it

How to Download iOS Simulator (Xcode) in Command Line and Install it

For faster connection speed and more flexibility.

Steps

  1. Start Xcode in command line by running this in commandline /Applications/Xcode.app/Contents/MacOS/Xcode
  2. Start downloading of the simulator
  3. Cancel it. YES CANCEL IT!
  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,

  • 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

@vesper8
Copy link

vesper8 commented Aug 21, 2019

When I goto ~/Library/Caches/com.apple.dt.Xcode there is no Downloads folder, even after I have downloaded another simulator using the GUI. It doesn't appear that it's using this folder to store the other simulators I've downloaded

Any idea what the new way to install this dmg file is on Xcode 10.3?

@johanforssell
Copy link

Screenshot 2019-08-30 at 13 18 37

@vesper8
Copy link

vesper8 commented Aug 31, 2019

@johanforsell I already did that, there is no Downloads folder inside. If I create it manually and copy the file to that folder as per the above instructions, it isn't detected by Xcode and basically doesn't do anything

@johanforsell
Copy link

@johanforsell I already did that, there is no Downloads folder inside. If I create it manually and copy the file to that folder as per the above instructions, it isn't detected by Xcode and basically doesn't do anything

@johanforssell

@alejandroiglesias
Copy link

@vesper8 after copying the downloaded file(s) to ~/Library/Caches/com.apple.dt.Xcode/Downloads and opening the Xcode preferences pane, you don't see anything new until you click to download the simulator again. This time, instead of showing a progress bar starting from the beginning, it will start at around 80% filled and will just install it. What's missing in the instructions is that you don't see anything new until you click again to download.

@yadames
Copy link

yadames commented May 22, 2020

@vesper8 any solutions? the same thing is happening to me

@mig8447
Copy link

mig8447 commented Oct 14, 2020

I'll leave this gist which contains a list of image URLs you can use to download different iOS versions
https://gist.github.com/rtrouton/2ca6f001b3cecb5037825c7f9d2e422e

And another link to more simulator URLs
https://github.com/ForceGT/iPhoneSimulatorSDK/tree/patch-1

@ForceGT
Copy link

ForceGT commented Oct 15, 2020

Adding to OP you can use Uget Download Manager
It is based off aria2c and is for those who are not familiar with the Command Line

@mig8447
Copy link

mig8447 commented Oct 15, 2020

For this to work in Mojave with iOS 9.3 you have to doenload XCode 10.2.1 from https://developer.apple.com/download/more/?name=Xcode

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment