class FastlaneCore::DeviceManager::Device
Use the UDID for the given device when setting the destination Why? Because we might get this error message > The requested device could not be found because multiple devices matched the request.
This happens when you have multiple simulators for a given device type / iOS combination
{ platform:iOS Simulator, id:1685B071-AFB2-4DC1-BE29-8370BA4A6EBD, OS:9.0, name:iPhone 5 } { platform:iOS Simulator, id:A141F23B-96B3-491A-8949-813B376C28A7, OS:9.0, name:iPhone 5 }
We don't want to deal with that, so we just use the UDID
Attributes
ios_version[RW]
is_simulator[RW]
name[RW]
os_type[RW]
os_version[RW]
state[RW]
udid[RW]
Public Class Methods
new(name: nil, udid: nil, os_type: nil, os_version: nil, state: nil, is_simulator: nil)
click to toggle source
# File fastlane_core/lib/fastlane_core/device_manager.rb, line 188 def initialize(name: nil, udid: nil, os_type: nil, os_version: nil, state: nil, is_simulator: nil) self.name = name self.udid = udid self.os_type = os_type self.os_version = os_version self.ios_version = os_version self.state = state self.is_simulator = is_simulator end
Public Instance Methods
delete()
click to toggle source
# File fastlane_core/lib/fastlane_core/device_manager.rb, line 209 def delete UI.message("Deleting #{self}") `xcrun simctl shutdown #{self.udid}` unless self.state == "Shutdown" `xcrun simctl delete #{self.udid}` return end
reset()
click to toggle source
# File fastlane_core/lib/fastlane_core/device_manager.rb, line 202 def reset UI.message("Resetting #{self}") `xcrun simctl shutdown #{self.udid}` if self.state == "Booted" `xcrun simctl erase #{self.udid}` return end
to_s()
click to toggle source
# File fastlane_core/lib/fastlane_core/device_manager.rb, line 198 def to_s self.name end