Do they share the same UDID? How are they implemented under the hood?
The scenario is I have 4 clones running UI tests in parallel. I need a clean simulator for some tests (but want to keep random test order)
To delete individual, available, simulators it's easier to do so through Xcode. Go to Window > Devices and simulators, then select the Simulators tab. You can right-click on any simulator and select 'delete' to get rid of it.
To remove all data and settings from an iOS simulator, just click Device then select Erase All Content and Settings from the drop-down menu: A confirm dialog will show up. Click on the Erase button: The process will take a while to finish.
In this article, I collected several options on how to launch the simulator from the Terminal, folder, search, and Xcode. Choose which option you like more and use. The basic way to open a list of simulators is to use Xcode -> Window -> Devices and Simulators. Here you can create and manage all available simulators.
Open Xcode and click Menu > Xcode > Preferences > Select Components, and then choose the simulator version you want to download. When a simulator is opened from AppStudio, AppStudio Player automatically installs (if necessary) and opens in it.
Command to erase all testing simulators (you'll need to restart Xcode after that):
xcrun simctl --set testing delete all
Overall, it should be better to just reset those sims (you won't need to restart after that):
xcrun simctl --set testing shutdown all
xcrun simctl --set testing erase all
To erase specific one you first need to get his ID with list devices
and then shutdown and erase:
xcrun simctl --set testing list devices
xcrun simctl --set testing shutdown 2BC2B50E-C4BA-45B9-9C73-AF5097BA1F0B
xcrun simctl --set testing erase 2BC2B50E-C4BA-45B9-9C73-AF5097BA1F0B
Thanks Scott McCoy for his answer.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With