Module: DeviceAPI::IOS
- Defined in:
- lib/device_api/ios/device.rb,
lib/device_api/ios.rb,
lib/device_api/ios/idevice.rb,
lib/device_api/ios/signing.rb,
lib/device_api/ios/ipaddress.rb,
lib/device_api/ios/plistutil.rb,
lib/device_api/ios/idevicename.rb,
lib/device_api/ios/idevicedebug.rb,
lib/device_api/ios/ideviceinstaller.rb,
lib/device_api/ios/ideviceprovision.rb
Overview
iOS component of DeviceAPI
Defined Under Namespace
Classes: Device, IDevice, IDeviceCommandError, IDeviceDebug, IDeviceDebugError, IDeviceInstaller, IDeviceInstallerError, IDeviceName, IDeviceNameError, IDeviceProvision, IDeviceProvisionError, IPAddress, IPAddressError, Plistutil, PlistutilCommandError, Signing, SigningCommandError
Class Method Summary collapse
-
.device(serial) ⇒ Object
Retrieve a Device object by serial ID.
-
.devices ⇒ Object
Returns an array of connected iOS devices.
Class Method Details
.device(serial) ⇒ Object
Retrieve a Device object by serial ID
25 26 27 28 29 30 |
# File 'lib/device_api/ios.rb', line 25 def self.device(serial) if serial.to_s.empty? raise DeviceAPI::BadSerialString.new("Serial was '#{ serial.nil? ? 'nil' : serial }'") end DeviceAPI::IOS::Device.new(serial: serial, state: 'device') end |
.devices ⇒ Object
Returns an array of connected iOS devices
16 17 18 19 20 21 22 |
# File 'lib/device_api/ios.rb', line 16 def self.devices IDevice.devices.map do |d| if d.keys.first DeviceAPI::IOS::Device.new(serial: d.keys.first, display: d.values.flatten.first, state: 'ok') end end end |