bin/calabash-ios-sim.rb in calabash-cucumber-0.9.20 vs bin/calabash-ios-sim.rb in calabash-cucumber-0.9.21

- old
+ new

@@ -1,15 +1,17 @@ +require 'sim_launcher' + def quit_sim `echo 'application "iPhone Simulator" quit' | osascript` end def calabash_sim_reset reset_script = File.absolute_path("#{@script_dir}/reset_simulator.scpt") - sdks = `#{@iphonesim} showsdks`.split("\n") + launcher = SimLauncher::Simulator.new + sdks = SimLauncher::SdkDetector.new(launcher).available_sdk_versions sdks.each do |sdk_path_str| - sdk_path = sdk_path_str.split(" ") - `#{@iphonesim} launch DUMMY_APP #{sdk_path[0]} ipad 2> /dev/null` + launcher.launch_ios_app("DUMMY_APP",sdk_path_str,"ipad") system("osascript #{reset_script}") - `#{@iphonesim} launch DUMMY_APP #{sdk_path[0]} iphone 2> /dev/null` + launcher.launch_ios_app("DUMMY_APP",sdk_path_str,"iphone") system("osascript #{reset_script}") end quit_sim