Method: RunLoop::SimControl#relaunch_sim

Defined in:
lib/run_loop/sim_control.rb

#relaunch_sim(opts = {}) ⇒ Object

Relaunch the simulator for the current version of Xcode. If that simulator is already running, it is quit.

Parameters:

  • opts (Hash) (defaults to: {})

    Optional controls.

Options Hash (opts):

  • :post_quit_wait (Float) — default: 1.0

    How long to sleep after the simulator has quit.

  • :post_launch_wait (Float) — default: 2.0

    How long to sleep after the simulator has launched.



107
108
109
110
111
112
113
# File 'lib/run_loop/sim_control.rb', line 107

def relaunch_sim(opts={})
  default_opts = {:post_quit_wait => 1.0,
                  :post_launch_wait =>  2.0}
  merged_opts = default_opts.merge(opts)
  quit_sim(merged_opts)
  launch_sim(merged_opts)
end