public class AppleDeviceController extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
AppleDeviceController.AppleDeviceKindEnum
Enum indicating the different kinds of devices possible
|
static class |
AppleDeviceController.LaunchBehavior
Enum for the different ways to launch the simulator
|
| Constructor and Description |
|---|
AppleDeviceController(ProcessExecutor processExecutor,
Path idbPath) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
bootSimulator(String simulatorUdid)
Starts up the iOS simulator using idb, which waits until the simulator is completely booted.
|
boolean |
bringSimulatorToFront(String simulatorUdid)
Brings the desired simulator to the front
|
com.google.common.collect.ImmutableSet<String> |
getBootedSimulatorsUdids() |
AppleDeviceController.AppleDeviceKindEnum |
getDeviceKind(AppleDevice device) |
com.google.common.collect.ImmutableSet<AppleDevice> |
getPhysicalDevices() |
com.google.common.collect.ImmutableSet<AppleDevice> |
getSimulators() |
Optional<String> |
getSimulatorUdidForTest()
Picks the simulator to be used for testing
|
Optional<String> |
getUdidFromDeviceName(String name) |
Optional<String> |
installBundle(String deviceUdid,
Path bundlePath)
Installs a bundle in a previously-started simulator or physical device.
|
boolean |
isSimulatorAvailable(String simulatorUdid) |
boolean |
launchInstalledBundle(String deviceUdid,
String bundleID)
Launches an installed bundle in a device
|
Optional<String> |
startDebugServer(String deviceUdid,
String bundleID)
Starts the debugserver of the installed app
|
public AppleDeviceController(ProcessExecutor processExecutor, Path idbPath)
public com.google.common.collect.ImmutableSet<AppleDevice> getSimulators()
public com.google.common.collect.ImmutableSet<AppleDevice> getPhysicalDevices()
public com.google.common.collect.ImmutableSet<String> getBootedSimulatorsUdids()
public Optional<String> getUdidFromDeviceName(String name)
public Optional<String> getSimulatorUdidForTest()
public boolean bootSimulator(String simulatorUdid) throws IOException, InterruptedException
Call isSimulatorAvailable(String) before invoking this method to ensure the
simulator is available.
IOExceptionInterruptedExceptionpublic boolean isSimulatorAvailable(String simulatorUdid)
simulatorUdid - of the simulator is availablepublic Optional<String> installBundle(String deviceUdid, Path bundlePath) throws IOException, InterruptedException
IOExceptionInterruptedExceptionpublic boolean bringSimulatorToFront(String simulatorUdid) throws IOException, InterruptedException
IOExceptionInterruptedExceptionpublic boolean launchInstalledBundle(String deviceUdid, String bundleID) throws IOException, InterruptedException
IOExceptionInterruptedExceptionpublic Optional<String> startDebugServer(String deviceUdid, String bundleID) throws IOException, InterruptedException
IOExceptionInterruptedExceptionpublic AppleDeviceController.AppleDeviceKindEnum getDeviceKind(AppleDevice device)
device - to be analized