【iOS】XCode 中下载 iOS 模拟器失败

Posted by 西维蜀黍 on 2017-05-15, Last Modified on 2024-04-29

Problem

I’m getting an issue when attempting to install the iOS 17.0 simulator in Xcode 15.0. The problem is when Xcode updated to version 15, and now all the simulators I had previously downloaded have disappeared. Even though I have installed iOS 15.0 before, it doesn’t seem to appear for me to run, and I’m getting an error message stating that I need iOS 17. Then when I try to download this from the xcode. I ended up with this error message.

Solution 1 - via Terminal

ou can try downloading and installing iOS 17.0 Simulator runtimes for a specific platform using the Terminal. Use the -downloadPlatform option and specify the platform like this:

xcodebuild -downloadPlatform iOS

Solution 2 - Download from Apple Website

  • Go to the URL: https://developer.apple.com/download/all/
  • You will be asked to login with your developer account.
  • Download “iOS 17 Simulator Runtime”. With Chrome, you also might get download paused but be patient. Eventually after a long time it will downloaded as Chrome has better built in tolerance to resume downloads.

  • Run the following command:
xcrun simctl runtime add "Path to downloaded dmg file"
e.g. xcrun simctl runtime add "~Downloads/iOS_17_Simulator_Runtime.dmg" 

And after that you should be able to continue with your app development.

Reference