Reset iOS Simulator With a Rake Task

A slight annoyance while developing with RubyMotion is having to reset the iOS Simulator. It is quite frustrating to use a mouse sometimes to perform a repetitive task, so I thought it would be nice to simplify that to run it in a command line.

By executing AppleScript using the osascript command, we can call the "Reset Content and Settings" menu item in the simulator and have it reset by running the following rake task:

rake simulator:reset