Manually download/install Xcode’s simulator

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>
Insert image description here
Then enter the Xcode download page
Xcode->Settings…->Platforms
Insert image description here
This is because I have downloaded it all. Click the + sign in the lower left corner to demonstrate how to obtain the download address
Insert image description here
Insert image description here
After it comes out, click Cancel (x button)
Insert image description here
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"

Guess you like

Origin blog.csdn.net/qq_18683985/article/details/133774728