Method: RunLoop::SimControl#quit_sim
- Defined in:
- lib/run_loop/sim_control.rb
#quit_sim(opts = {}) ⇒ Object
TODO:
Consider migrating AppleScript calls to separate class
If it is running, quit the simulator for the current version of Xcode.
74 75 76 77 78 79 80 81 |
# File 'lib/run_loop/sim_control.rb', line 74 def quit_sim(opts={}) if sim_is_running? default_opts = {:post_quit_wait => 1.0 } merged_opts = default_opts.merge(opts) `echo 'application "#{sim_name}" quit' | xcrun osascript` sleep(merged_opts[:post_quit_wait]) if merged_opts[:post_quit_wait] end end |