Class: DeviceAPI::IOS::IDeviceName

Inherits:
Execution
  • Object
show all
Defined in:
lib/device_api/ios/idevicename.rb

Overview

Namespace for all methods encapsulating idevicename calls

Class Method Summary collapse

Class Method Details

.name(device_id) ⇒ Object

Returns the device name based on the provided UUID

Parameters:

  • device_id

    uuid of the device

Returns:

  • device name if device is connected



11
12
13
14
15
# File 'lib/device_api/ios/idevicename.rb', line 11

def self.name(device_id)
  result = execute("idevicename -u #{device_id}")
  return IDeviceNameError.new(result.stderr) if result.exit != 0
  result.stdout.strip
end