Download Xcode simulator directly

2019-03-07 19:54发布

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

5条回答
劳资没心,怎么记你
2楼-- · 2019-03-07 20:20

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 Downloads 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!

查看更多
姐就是有狂的资本
3楼-- · 2019-03-07 20:29

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

查看更多
别忘想泡老子
4楼-- · 2019-03-07 20:30

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.

查看更多
闹够了就滚
5楼-- · 2019-03-07 20:32

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.

查看更多
对你真心纯属浪费
6楼-- · 2019-03-07 20:43

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.

查看更多
登录 后发表回答