Class: FastlaneCore::Simulator::Device

Inherits:
Object
  • Object
show all
Defined in:
lib/fastlane_core/simulator.rb

Overview

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name: nil, udid: nil, ios_version: nil) ⇒ Device

Returns a new instance of Device.



96
97
98
99
100
# File 'lib/fastlane_core/simulator.rb', line 96

def initialize(name: nil, udid: nil, ios_version: nil)
  self.name = name
  self.udid = udid
  self.ios_version = ios_version
end

Instance Attribute Details

#ios_versionObject

Returns the value of attribute ios_version.



94
95
96
# File 'lib/fastlane_core/simulator.rb', line 94

def ios_version
  @ios_version
end

#nameObject

Returns the value of attribute name.



90
91
92
# File 'lib/fastlane_core/simulator.rb', line 90

def name
  @name
end

#udidObject

Returns the value of attribute udid.



92
93
94
# File 'lib/fastlane_core/simulator.rb', line 92

def udid
  @udid
end

Instance Method Details

#to_sObject



102
103
104
# File 'lib/fastlane_core/simulator.rb', line 102

def to_s
  self.name
end