直接下载 Xcode 模拟器

我今天下载了 Xcode 6.2,它取代了之前的 Xcode 6.1 现在使用模拟器7.1和8.1,它要求下载两个模拟器,但出于某种原因,在尝试4-5次后,它显示下载或请求超时的网络问题(注意: 在 n/w 诊断后,它显示网络正常工作)

所以有没有什么直接链接可以让我直接下载模拟器软件包或者至少在某个地方显示百分比/大小的进度,而不是一个条

如果这是不可能的,我已经阅读了关于复制旧的模拟器到新的 Xcode,所以我怎么能把旧的模拟器(7.1 & 8.1)在 Xcode 6.2,它的工作直接无需再次下载

119992 次浏览

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.

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!

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.

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.

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

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.

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

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

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.