Reinstall iOS Simulators


TLDR; Use the following to completely destroy all your iOS Simulators and to create a new batch.

curl "https://gist.githubusercontent.com/cabeca/cbaacbeb6a1cc4683aa5/raw/8e17f39f5a7413fd0559c9e6808e01b6fb514422/simulator_populator" -o "simulator_populator.rb" && chmod +x simulator_populator.rb && ./simulator_populator.rb

While trying out the new Xcode 7 beta’s, this happened to me… a lot…

Looks like the different Xcode’s have varying ideas about when to install new devices and just go for safe. If you install a lot of new beta’s, this might look familiar to you.

While searching for the solution I came across the command line tool and options:

> xcrun simctl list
> xcrun simctl delete <device>
> xcrun simctl create <name> <device type id> <runtime id>

Using some regex witchcraft, I placed the entire list of device UUIDs in a file and deleted all my simulators and installed a couple of new ones. And of course, I vowed to create a script to avoid having to do this manually again.

Instead, I got the following tweet a while later;

@miguelcabeca has gifted us with this wonderfull little script;

Save that somewhere, make it executable and run it. You’ll have a nice clean list of iOS Simulators once more!