class FastlaneCore::Simulator
Public Class Methods
all()
click to toggle source
# File lib/fastlane_core/device_manager.rb, line 179 def all return DeviceManager.simulators('iOS') end
clear_cache()
click to toggle source
# File lib/fastlane_core/device_manager.rb, line 200 def clear_cache @devices = nil end
launch(device)
click to toggle source
# File lib/fastlane_core/device_manager.rb, line 204 def launch(device) return unless device.is_simulator simulator_path = File.join(Helper.xcode_path, 'Applications', 'Simulator.app') UI.verbose "Launching #{simulator_path} for device: #{device.name} (#{device.udid})" Helper.backticks("open -a #{simulator_path} --args -CurrentDeviceUDID #{device.udid}", print: $verbose) end
reset(udid: nil, name: nil, os_version: nil)
click to toggle source
Reset simulator by UDID or name and OS version Latter is useful when combined with -destination option of xcodebuild
# File lib/fastlane_core/device_manager.rb, line 195 def reset(udid: nil, name: nil, os_version: nil) match = all.detect { |device| device.udid == udid || device.name == name && device.os_version == os_version } match.reset if match end
reset_all()
click to toggle source
Reset all simulators of this type
# File lib/fastlane_core/device_manager.rb, line 184 def reset_all all.each(&:reset) end
reset_all_by_version(os_version: nil)
click to toggle source
# File lib/fastlane_core/device_manager.rb, line 188 def reset_all_by_version(os_version: nil) return false unless os_version all.select { |device| device.os_version == os_version }.each(&:reset) end