public class AppleSimulatorController extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
AppleSimulatorController.LaunchBehavior |
| Constructor and Description |
|---|
AppleSimulatorController(ProcessExecutor processExecutor,
Path simctlPath,
Path iosSimulatorPath) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
canStartSimulator(String simulatorUdid) |
boolean |
installBundleInSimulator(String simulatorUdid,
Path bundlePath)
Installs a bundle in a previously-started simulator.
|
Optional<Long> |
launchInstalledBundleInSimulator(String simulatorUdid,
String bundleID,
AppleSimulatorController.LaunchBehavior launchBehavior,
List<String> args)
Launches a previously-installed bundle in a started simulator.
|
Optional<Long> |
startSimulator(String simulatorUdid,
long timeoutMillis)
Starts up the iOS simulator, blocking the calling thread until the simulator boots or
timeoutMillis passes, whichever happens first. |
Optional<Long> |
waitForSimulatorsToShutdown(long timeoutMillis)
Waits up to
timeoutMillis for all simulators to shut down. |
public AppleSimulatorController(ProcessExecutor processExecutor, Path simctlPath, Path iosSimulatorPath)
public Optional<Long> startSimulator(String simulatorUdid, long timeoutMillis) throws IOException, InterruptedException
timeoutMillis passes, whichever happens first.
Call canStartSimulator(String) before invoking this method to ensure the simulator
can be started.
Optional.empty() otherwise.IOExceptionInterruptedExceptionpublic boolean canStartSimulator(String simulatorUdid) throws IOException, InterruptedException
IOExceptionInterruptedExceptionpublic Optional<Long> waitForSimulatorsToShutdown(long timeoutMillis) throws IOException, InterruptedException
timeoutMillis for all simulators to shut down.Optional.empty() otherwise.IOExceptionInterruptedExceptionpublic boolean installBundleInSimulator(String simulatorUdid, Path bundlePath) throws IOException, InterruptedException
IOExceptionInterruptedExceptionpublic Optional<Long> launchInstalledBundleInSimulator(String simulatorUdid, String bundleID, AppleSimulatorController.LaunchBehavior launchBehavior, List<String> args) throws IOException, InterruptedException
IOExceptionInterruptedException