Table of contents
Preface
After a certain version of Xcode was updated, it did not come with the iOS Simulator, which resulted in the inability to compile the project after downloading a new Xcode. The company's network was also very bad, and every time it was disconnected and tried again, it had to be downloaded again, which made it impossible to download it at all. It had a special impact. work progress.
solution
1. Obtain the simulator package download address
1.1 Apple backend
https://developer.apple.com/download/all/?q=Xcode
1.2 Manual
Search for console in LaunchPad/Focus Search.
Select the current computer and click Start Streaming. Enter "DVTDownloadable" in the search box in the upper right corner. a>
Then enter the Xcode download page
Xcode->Settings…->Platforms
This is because I have downloaded it all. Click the + sign in the lower left corner to demonstrate how to obtain the download address
After it comes out, click Cancel (x button)
The download address will appear in the console. You can select the blue one above and paste it, and then get the content, or directly paste the download address in the instructions below.
2. Use third-party download tools to download
I am using chrome download here
3. Use the command to install the simulator
xcrun simctl runtime add "~/Downloads/iOS_16.4_Simulator_Runtime.dmg"