lib/calabash/ios/device/device_implementation.rb in calabash-2.0.0.pre3 vs lib/calabash/ios/device/device_implementation.rb in calabash-2.0.0.pre4

- old
+ new

@@ -76,11 +76,11 @@ # physical device is available. def self.default_physical_device_identifier identifier = Environment::DEVICE_IDENTIFIER if identifier.nil? - connected_devices = RunLoop::XCTools.new.instruments(:devices) + connected_devices = RunLoop::Instruments.new.physical_devices if connected_devices.empty? raise 'There are no physical devices connected.' elsif connected_devices.count > 1 raise 'There is more than one physical devices connected. Use CAL_DEVICE_ID to indicate which you want to connect to.' else @@ -637,11 +637,11 @@ end # @!visibility private # Very expensive! def Device.fetch_matching_physical_device(udid_or_name) - xctools = RunLoop::XCTools.new - xctools.instruments(:devices).detect do |device| + instruments = RunLoop::Instruments.new + instruments.physical_devices.detect do |device| device.name == udid_or_name || device.udid == udid_or_name end end