Class: FastlaneCore::Simulator
- Inherits:
-
Object
- Object
- FastlaneCore::Simulator
show all
- Defined in:
- lib/fastlane_core/device_manager.rb
Class Method Summary
collapse
Class Method Details
.all ⇒ Object
179
180
181
|
# File 'lib/fastlane_core/device_manager.rb', line 179
def all
return DeviceManager.simulators('iOS')
end
|
.clear_cache ⇒ Object
195
196
197
|
# File 'lib/fastlane_core/device_manager.rb', line 195
def clear_cache
@devices = nil
end
|
.launch(device) ⇒ Object
199
200
201
202
203
204
205
206
207
|
# File 'lib/fastlane_core/device_manager.rb', line 199
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) ⇒ Object
Reset simulator by UDID or name and OS version Latter is useful when combined with -destination option of xcodebuild
190
191
192
193
|
# File 'lib/fastlane_core/device_manager.rb', line 190
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 ⇒ Object
Reset all simulators of this type
184
185
186
|
# File 'lib/fastlane_core/device_manager.rb', line 184
def reset_all
all.each(&:reset)
end
|