Xcode offline using the command line to manually add the iOS / watchOS simulator Xcode install Simulator from the command line

You can use Settings - Platforms in Xcode to download and manage simulators for various devices.

However, in many cases, due to network or other reasons, you need to manually download the dmg file of the simulator and add the simulator manually. You can use the following command to add it manually.

1. Go to Apple Developer to download the Xcode and simulator files of the corresponding device. Here we take Xcode 15.0 and iOS 17 Simulator as examples; < /span>

https://developer.apple.com/download/all/

2. Install Xcode_15_Release_Candidate.xip to the Applications directory;

3. Execute in Terminal:

sudo xcode-select -s /Applications/Xcode.app

sudo xcodebuild -runFirstLaunch

sudo xcrun simctl runtime add "/Path/iOS_17_Simulator_Runtime_Release_Candidate.dmg"

4. Add the corresponding version of the simulator in Xcode - Window - Devices and Simulators. You can also add simulators for other devices in the same way.

Supongo que te gusta

Origin blog.csdn.net/loveric/article/details/132851538
Recomendado
Clasificación