The Definitive iOS Simulator Reset Script

Created after being inspired by this stackoverflow post.

What's this?

Gotta reset your iOS Simulator? Gotta reset more than just one? What about all iOS versions or all device types? Good luck doing that manually...

Download this script! Run it! Awesomeness guaranteed!

Screenshot

NOTE: If you haven't already, enable "Universal Access", aka. "Enable access for assistive devices" in System Preferences > Accessibility.

Credits

Credit goes to myself, Oded Regev (answer in stackoverflow post) and Jacob Rus (for the fine "menu_click" code).