95

I have downloaded Xcode 6.2 today which replaced previous Xcode 6.1 now to use simulator 7.1 & 8.1 it asks to download both simulators , but for some reason after trying 4-5 times it shows network issues in downloading or request time out (note: in n/w diagnostic after it shows net is working properly)

so is there any direct link from where i can download the simulator package directly or somewhere at least it shows progress in percentage/size instead just a bar

if it's not possible i have read about copying the older simulator to new Xcode so how can i place the old simulator(7.1 & 8.1) in Xcode 6.2 that it works directly without downloading again

Krunal
  • 77,632
  • 48
  • 245
  • 261
HardikDG
  • 5,892
  • 2
  • 26
  • 55

13 Answers13

183

Clicking on Download in Xcode didn't do anything - the progress bar did not progress (does that make it a regress bar?).

This is what worked for me:

  1. Open Xcode, open preferences, go to the Components section.

  2. Open the Console App, clear the console.

  3. Go back to the Xcode preferences. Start the simulator download, then cancel it.

  4. Now in the Console, you will see something about the cancellation with the download URL.

  5. Copy the URL from the Console. Then in Terminal in some suitable scratch folder, download it:

    curl [the url you copied] -O (the letter O, not a zero)

  6. Finally, copy this file to ~/Library/Caches/com.apple.dt.Xcode/Downloads
    Remove all *.dvtdownloadableindex files (maybe it doesn't matter, but I removed them).

  7. In Xcode, in the Downloads section, start the Simulator download again, it should find the file you downloaded and install it.

How easy was that! Only 7 steps, hah!

Abhishek Ghaskata
  • 1,802
  • 2
  • 6
  • 11
emp
  • 3,350
  • 1
  • 22
  • 19
  • 3
    Worked great! I experimented by not removing the `*.dvtdownloadableindex` files in step 6, and the simulator installed fine. – ɲeuroburɳ Jul 27 '15 at 20:18
  • 1
    That's also helped to download it at all. I have not very fast connection at home. So downloading was always incomplete with "timeout". This solution helped in my case as well. Thank you! – Semyon Vyskubov Sep 06 '15 at 19:59
  • 1
    Doesn't show any message in console area, you are referring to xcode's debug console right? – Prajeet Shrestha Oct 26 '15 at 18:26
  • 5
    @PrajeetShrestha, he's referring to MacOS's `Console` app - you can find it by pressing cmd+space and typing `console` – Tash Pemhiwa Nov 09 '15 at 09:01
  • I do not have a Downloads folder in my ~/Library/Caches/com.apple.dt.Xcode directory – Tash Pemhiwa Nov 09 '15 at 13:02
  • 8
    @TashPemhiwa: just create a Downloads folder in ~/Library/Caches/com.apple.dt.Xcode before moving the dmg file. I did this and it worked perfectly. – phatmann Nov 10 '15 at 14:13
  • 4
    @emp One suggestion: instead of using curl, open the URL in Safari. This way you'll be able to resume the download if it fails midway through. – Chris Vasselli Feb 07 '16 at 23:24
  • @PrajeetShrestha cancel the download to see in the console. – neelabh Apr 04 '16 at 04:16
  • Chris Vasselli is right. Just download from Safari - a lot easier to manage. Plus you can see the speed in Download popup. Easy to stop and resume, etc. – GeneCode Aug 21 '16 at 05:50
  • Hi @emp I tried the same 7 steps but didn't work for me. Does it is required to do the download on my Mac system? I have downloaded the simulators on the other system I have experimented with Xcode 8.2.1 and simulator for iOS 9.3 and iOS 8.4 plus try to install the Guides and Sample code. But no luck I am not able to install any of them with the above mentioned 7 steps Please help me. – The iOSDev Dec 26 '16 at 04:01
  • 1
    Just to clarify, they don't mean the Xcode Console but the Console application (*not* the system Terminal either). Use spotlight to find it.. it's under Utilities/. – kvanbere Jul 24 '17 at 12:38
  • 2
    com.apple.dt.Xcode is now a bundle, not a folder. Same, with 'Show Package Contents', and create a 'Download' folder right there. – bauerMusic Sep 28 '17 at 12:36
  • curl is GREAT.. could resume when download hanged!! And the best part that it's fun to trick XCode - I Love That Solution!!! – Yitzchak May 27 '18 at 20:26
  • 1
    i dont have com.apple.dt.Xcode folder in caches, please help me where is the location now – Ali Yousefi Oct 12 '18 at 11:24
  • 1
    FYI: as of Xcode 11 (11/2019) `sudo /Applications/Xcode.app/Contents/MacOS/Xcode` with "Xcode >> Preferences >> Components", download/cancel (thanks @superquanganh) to read off the download URL along with `cp com.apple.pkg.*.dmg ~/Library/Caches/com.apple.dt.Xcode/Downloads/` (thanks @emp) still works. – Gary Nov 17 '19 at 12:56
  • 3
    Apple is so cool to not support resuming of downloads while it is so common that 3GB file gets interrupted. Thanks you helped me out. – Renetik Apr 08 '20 at 22:47
  • @Gary it's not working for me, I've Xcode 13 with M1 chip. It's directly downloading even I've kept the .dmg inside the ~/Library/Caches/com.apple.dt.Xcode/Downloads/. I've also noticed nothing is getting downloaded in Downloads folder while the simulator is trying to download the simulator. – PJ1405 Mar 04 '22 at 09:14
  • @phatmann I don't even have com.apple.dt.Xcode folder in Caches – Abdullah Mar 19 '22 at 17:18
  • @Abdullah just create it manually. – phatmann Mar 20 '22 at 18:56
  • @phatmann i did try by creating these folders manually but still Xcode do not detect the downloaded .dmg file for iOS 13.7 simulator – Abdullah Mar 23 '22 at 10:14
  • 1
    Perhaps new Xcode version works differently. Maybe someone will chime in with more info. – phatmann Mar 25 '22 at 04:05
  • I dont have such folder at all – K.R. Jun 09 '22 at 10:14
  • I dont see Component section. Did they rename it to Platforms? – Rohit Singh Feb 13 '23 at 18:36
  • 1
    @phatmann the work around here is to restart the xcode. This fixes the issue as xcode now detects the downloaded file . – harpreet seera Feb 23 '23 at 06:58
  • I have Xcode 14.3. I downloaded Simulator 14.5. I placed the downloaded dmg in the newly created Downloads folder, but the Simulator doesn't show. – wzso Aug 31 '23 at 02:20
126

To add iOS Simulator in XCode perform below steps:

  • Download iOS Simulator from Below Link:

  • After download completes, copy this file to ~/Library/Caches/com.apple.dt.Xcode/Downloads In some cases, we have to remove all *.dvtdownloadableindex files (maybe it doesn't matter, I didn't remove them).

  • In case directory ~/Library/Caches/com.apple.dt.Xcode don't have download folder then, just click Show package content create Downloads folder, before moving the dmg file.

  • In Xcode, in the Downloads section, start the Simulator download again, it should find the file you downloaded and install it.

(Newest on top. only the latest revision is kept in the list.)

  • Simulator Link:

iOS 15.5

https://devimages-cdn.apple.com/downloads/xcode/simulators/com.apple.pkg.iPhoneSimulatorSDK15_5-15.5.1.1653527639.dmg

iOS 15.4

https://devimages-cdn.apple.com/downloads/xcode/simulators/com.apple.pkg.iPhoneSimulatorSDK15_4-15.4.1.1650505652.dmg

iOS 15.2

https://devimages-cdn.apple.com/downloads/xcode/simulators/com.apple.pkg.iPhoneSimulatorSDK15_2-15.2.1.1643410298.dmg

iOS 14.5

https://devimages-cdn.apple.com/downloads/xcode/simulators/com.apple.pkg.iPhoneSimulatorSDK14_5-14.5.1.1621461325.dmg

iOS 14.4

https://devimages-cdn.apple.com/downloads/xcode/simulators/com.apple.pkg.iPhoneSimulatorSDK14_4-14.4.1.1611903691.dmg

iOS 14.3

https://devimages-cdn.apple.com/downloads/xcode/simulators/com.apple.pkg.iPhoneSimulatorSDK14_3-14.3.1.1611873653.dmg

iOS 14.2

https://devimages-cdn.apple.com/downloads/xcode/simulators/com.apple.pkg.iPhoneSimulatorSDK14_2-14.2.1.1605311653.dmg

iOS 14.1

https://devimages-cdn.apple.com/downloads/xcode/simulators/com.apple.pkg.iPhoneSimulatorSDK14_1-14.1.1.1604100028.dmg

iOS 14.0

https://devimages-cdn.apple.com/downloads/xcode/simulators/com.apple.pkg.iPhoneSimulatorSDK14_0-14.0.1.1604100028.dmg

iOS 13.7

https://devimages-cdn.apple.com/downloads/xcode/simulators/com.apple.pkg.iPhoneSimulatorSDK13_7-13.7.1.1599165590.dmg

iOS 13.6

https://devimages-cdn.apple.com/downloads/xcode/simulators/com.apple.pkg.iPhoneSimulatorSDK13_6-13.6.1.1597276955.dmg

iOS 13.5

https://devimages-cdn.apple.com/downloads/xcode/simulators/com.apple.pkg.iPhoneSimulatorSDK13_5-13.5.1.1591226335.dmg

iOS 13.4

https://devimages-cdn.apple.com/downloads/xcode/simulators/com.apple.pkg.iPhoneSimulatorSDK13_4-13.4.1.1586370836.dmg

iOS 13.3

https://devimages-cdn.apple.com/downloads/xcode/simulators/com.apple.pkg.iPhoneSimulatorSDK13_3-13.3.1.1580170331.dmg

iOS 13.2

https://devimages-cdn.apple.com/downloads/xcode/simulators/com.apple.pkg.iPhoneSimulatorSDK13_2-13.2.1.1575590084.dmg

iOS 13.1

https://devimages-cdn.apple.com/downloads/xcode/simulators/com.apple.pkg.iPhoneSimulatorSDK13_1-13.1.1.1571440502.dmg

iOS 13.0

https://devimages-cdn.apple.com/downloads/xcode/simulators/com.apple.pkg.iPhoneSimulatorSDK13_0-13.0.1.1571440502.dmg

iOS 12.4

https://devimages-cdn.apple.com/downloads/xcode/simulators/com.apple.pkg.iPhoneSimulatorSDK12_4-12.4.1.1568665771.dmg

iOS 12.2

https://devimages-cdn.apple.com/downloads/xcode/simulators/com.apple.pkg.iPhoneSimulatorSDK12_2-12.2.1.1557987768.dmg

iOS 12.1

https://devimages-cdn.apple.com/downloads/xcode/simulators/com.apple.pkg.iPhoneSimulatorSDK12_1-12.1.1.1543439531.dmg

iOS 12.0

https://devimages-cdn.apple.com/downloads/xcode/simulators/com.apple.pkg.iPhoneSimulatorSDK12_0-12.0.1.1537588161.dmg

iOS 11.4

https://devimages-cdn.apple.com/downloads/xcode/simulators/com.apple.pkg.iPhoneSimulatorSDK11_4-11.4.1.1527703358.dmg

iOS 11.3

https://devimages-cdn.apple.com/downloads/xcode/simulators/com.apple.pkg.iPhoneSimulatorSDK11_3-11.3.1.1524350608.dmg

iOS 11.2

https://devimages-cdn.apple.com/downloads/xcode/simulators/com.apple.pkg.iPhoneSimulatorSDK11_2-11.2.1.1516308624.dmg

iOS 11.1

https://devimages-cdn.apple.com/downloads/xcode/simulators/com.apple.pkg.iPhoneSimulatorSDK11_1-11.1.1.1510784422.dmg

iOS 11.0

https://devimages-cdn.apple.com/downloads/xcode/simulators/com.apple.pkg.iPhoneSimulatorSDK11_0-11.0.1.1508875951.dmg

iOS 10.3.1

https://devimages-cdn.apple.com/downloads/xcode/simulators/com.apple.pkg.iPhoneSimulatorSDK10_3-10.3.1.1495751597.dmg

Olcay Ertaş
  • 5,987
  • 8
  • 76
  • 112
Suraj Sonawane
  • 2,044
  • 1
  • 14
  • 24
26

If someone is searching in 2019, I have a better solution than looking at messy Console app.

1/ Open Terminal and run sudo /Applications/Xcode.app/Contents/MacOS/Xcode to open Xcode in sudo mode.

2/ Xcode > Preferences > Components > Download then cancel the simulator you want to download.

3/ Go back to Terminal, it will log the Downloadable with the Simulator link, copy that to Safari to download it.

superquanganh
  • 409
  • 4
  • 9
18

Follow these steps to add a (new) simulator (Xcode 9 onwards)

  1. Click on Simulator icon and open simulator list.
  2. At the end of list, there is an option to add new simulator "Add Additional Simulator". That will open 'Device & Simulator' window.
  3. Switch to 'Simulator' tab.
  4. There are three field in simulator tab.
  5. Click on '+' icon, on left bottom corner of window.
  6. Simulator Name: Enter simulator name here
  7. Device Type: Select iPad from this dropdown list
  8. OS Version: Select OS version from this dropdown list
  9. Click on 'Create'

A new simulator will be added in your Simulator option list.

Look at this snapshot to understand flow of above steps: enter image description here

And if there is no simulator/OS version in simulator list, you're looking for,

  1. Click on Simulator icon and open simulator list.
  2. At the end of list, there is an option to add new simulator "Download Simulator". That will open 'Component' window (from Xcode >> Preferences).
  3. Select/click simulator from list, which you need to download.

Look at this snapshot: enter image description here

Krunal
  • 77,632
  • 48
  • 245
  • 261
  • 8
    Why someone's upvoted this ? I don't get it. It didn't answer question at all. – Renetik Apr 08 '20 at 22:50
  • 1
    12 upvotes tell me this answer provides useful information for people finding this question, even if it does not directly answer the question itself. – joanis Nov 30 '21 at 14:27
5

So a quick tip for the people who use a download manager to download the .dmg file and didn't manage to get it work.

Once you place the file inside the 'Downloads' folder, Copy and paste the url somewhere and copy the file name alone.

( for me I was downloading iOS 9.3 so the url was - https://devimages.apple.com.edgekey.net/downloads/xcode/simulators/com.apple.pkg.iPhoneSimulatorSDK9_3-9.3.1.1460411551.dmg

and rename the file you just copied to the 'Downloads' folder, even if it looks exactly the same.

I wasted 2 to 3 hours trying to figure this out. The problem is that the filename looks exactly the same. But there was an extra space somewhere.

Another Tip: Also to get the download url - open system console. Make sure all messages are selected and search for xcode inside the Search box. Go to xcode simulator download screen, start and stop the download for the simulator you want and check inside console log. You should find the url there.

2xSamurai
  • 1,221
  • 12
  • 18
3

The download links for all Apple platform runtimes are available here:

https://devimages-cdn.apple.com/downloads/xcode/simulators/index2.dvtdownloadableindex

Runtimes for Apple platforms from 20221 can be installed with the xcrun simctl runtime add command:

xcrun simctl runtime add iOS_16_Simulator_Runtime.dmg

For earlier platforms use xcodes:

sudo xcodes runtimes install "iOS 15.0"

The following command will show all available runtimes:

sudo xcodes runtimes
Dave
  • 479
  • 3
  • 13
  • 1
    I tried this and got this error: ` (Unusable - Missing Signature: Error Domain=SimDiskImageErrorDomain Code=3 "Missing Signature" UserInfo={NSLocalizedDescription=Missing Signature, unusableErrorDetail=})`; Any idea how to fix this? – Eddie Mar 20 '23 at 08:02
  • 1
    @Eddie what command are you running? You will get that error using the `xcrun simctl runtime add` command with iOS 15 and earlier. – Dave Mar 25 '23 at 14:21
  • I ran the `xcrun simctl` command, trying to add simulator 12 – Eddie Mar 27 '23 at 03:49
  • You can only use `xcrun simctl` with iOS 16 or later. – Dave Mar 28 '23 at 06:46
  • The question was about how to install older simulators. Even if I ran `xcodes runtimes install "iOS 12.0"`, it reports: `Error: Runtime iOS 12.0 is invalid or not downloadable`, so it seems your answer doesn't help. – Eddie Mar 28 '23 at 09:41
  • 1
    That runtime is not available, you can use this: `sudo xcodes runtimes install "iOS 12.4"` – Dave Mar 28 '23 at 12:21
  • I tried 12.4 and got this error after downloaded the dmg file: `Error: Failed executing: /usr/sbin/installer -pkg /path/to/com.apple.pkg.iPhoneSimulatorSDK12_4.pkg -target / (1).` When I tried to mount the dmg, run the pkg file, it showed an error: `This package is incompatible with this version of macOS`. I guess MacOS 13.2 (Ventura) remove support for ios prior to 13 and we can't help it. – Eddie Mar 29 '23 at 07:57
  • I am able to successfully install the iOS 12.4 runtime on macOS 13.3. – Dave Mar 29 '23 at 17:50
  • I've updated to 13.3 and still the same error. Maybe it's because I'm using a M1 Mac? – Eddie Mar 30 '23 at 07:08
  • I installed the runtime on two M1 Macs running macOS 12.5 and 13.3. Does your terminal have Full Disk Access? https://github.com/RobotsAndPencils/xcodes/issues/272#issuecomment-1433495152 – Dave Mar 30 '23 at 17:25
  • I've granted Full Disk Access and now it is installed completely. However, I still can't use it in xcode as there's no option to select the simulator (see: https://imgur.com/a/ddpBP52). – Eddie Mar 31 '23 at 04:58
  • According to Apple Feedback, this means that the version of macOS does not support that runtime version. – Dave Mar 31 '23 at 19:29
  • This should be the new accepted answer! To install iOS 17 runtimes just use the command: `xcrun simctl runtime add iOS_17_beta_Simulator_Runtime.dmg` (after downloading .dmg file from Apple website) – Buju Jun 06 '23 at 08:43
3

✅ Official Download from Apple - (Since Xcode 15)

  1. You have to login before downloading anything below.

  2. You can find all Xcode dmg/xip files directly on https://developer.apple.com/download/all/ (requires Apple ID).

  3. Simulator runtimes are in the collapsing menu of each corresponding Xcode.

Here is a list of all available runtimes for download:

Xcode 15


Method 1:

You should copy the content in the downloaded DMG from:

{THE_MOUNTED_DMG_YOU_JUST_DOWNLOADED}/Library/Developer/CoreSimulator/Profiles

to

/Library/Developer/CoreSimulator/Profiles

Method 2:

Also, you can just use the simctl command to install it:

sudo xcrun simctl runtime add PATH_TO_THE_DOWNLIADED_DMG_FILE
Mojtaba Hosseini
  • 95,414
  • 31
  • 268
  • 278
2

so is there any direct link from where i can download the simulator package directly or somewhere at least it shows progress in percentage/size instead just a bar

You can't download the simulators package directly. Instead, you can download the xcodes from developer.apple using this link, which provides you the required simulators.

If you want the old simulators in new Xcode, download the desired Xcode using the above link,after downloading it, Open the DMG or open your existing older Xcode, right click on the Xcode application and click 'Show Package Contents', navigate to:Contents/Developer/Platforms/iPhoneSimulator.platform/Developer, copy the found simulator folder (eg. iPhoneSimulator7.1.sdk folder), repeat steps 2 & 3 for your current Xcode application, paste the simulator folder,restarting the Xcode will show you the new added simulators.

Shamsudheen TK
  • 30,739
  • 9
  • 69
  • 102
  • does copying only iPhoneSimulator folder will work or should i need to copy other folders also , as it not shown in list of new Xcode – HardikDG Mar 15 '15 at 08:22
  • yes copying only iPhone simulator folder does not showing that simulator in Xcode. do we have to copy any other folders? I am trying with Xcode 7.0 – Parth Pandya Nov 18 '15 at 07:15
1

Open iPhone 11 iOS 13.6 Simulator with Xcode 12 in Visual Studio for Mac(Xamarin):

  • You have to install both Xcode 12.0 & Xcode 11.6
  • First open 11.6 simulator then open visual studio
  • Go to Visual Studio Preferences and change Xcode SDK to point Xcode 11.6 version and Restart studio
  • Once it restart again Goto Visual studio preferences and set Xcode SDK path to point Xcode 12.0 and Restart it
  • Now close 11.6 simulator and after Visual studio starts voila you will see iPhone 11 iOS 13.6 Simulator option in list of simulators

Note: This steps are performed in Visual Studio for Mac 2019

enter image description here

Divyesh
  • 2,085
  • 20
  • 35
0

Follow below step to get new simulator with supported/different OS,

  • Open Xcode, open preferences, go to the Components section.
  • Go back to the Xcode preferences. Start the simulator OS download.
  • Now go to simulator open files and open simulator.
  • You can see your downloaded OS, Run and Test.
Amit Vaghela
  • 22,772
  • 22
  • 86
  • 142
0

New Xcode 14.1:

  • open setting / platforms: click add and you will find all type of simulators Xcode setting
0

You can also use xcodes tool to download and install wanted runtime !

List Runtimes

xcodes runtimes --include-betas

Install iOS Runtime

xcodes runtimes install "iOS 17.0-beta1"

I advice you to install aria2 before doing all this. Enjoy :)

Sbe-ng
  • 1
-1

Often, what it takes with Xcode is a good 'ol fashioned restart. This didn't work for me, so I restarted my MacBook Pro. Now it works :)

It's a quick thing to do when you're stuck.

Jeremy Eaton
  • 148
  • 1
  • 7