Skip to content

Instantly share code, notes, and snippets.

@jollychang
Forked from yurikoval/reset_ios_simulator.rake
Created August 13, 2014 06:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jollychang/9454bca4f3dbfa83730c to your computer and use it in GitHub Desktop.
Save jollychang/9454bca4f3dbfa83730c to your computer and use it in GitHub Desktop.
# encoding: UTF-8
namespace :simulator do
desc "Call 'Reset Content and Settings' in iOS Simulator menu"
task :reset do
%x{
osascript <<-END
tell application "iPhone Simulator" to activate
tell application "System Events"
tell process "iPhone Simulator"
tell menu bar 1
tell menu bar item "iOS Simulator"
tell menu "iOS Simulator" to click menu item "Reset Content and Settings…"
end tell
end tell
tell window 1 to click button "Reset"
end tell
end tell
END
}
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment