Orchard.SimulatorServer (orchard v0.1.7)

View Source

GenServer that manages the lifecycle of a single simulator.

This server:

  • Launches and manages a simulator process
  • Monitors the simulator's state
  • Automatically terminates if the simulator shuts down
  • Provides an interface for simulator operations

Summary

Functions

Boots the simulator if it's not already booted.

Returns a specification to start this module under a supervisor.

Gets the current state of the simulator.

Installs an app on the simulator.

Launches an app on the simulator.

Takes a screenshot of the simulator.

Shuts down the simulator.

Starts a SimulatorServer for the given simulator.

Performs a tap at the given coordinates.

Types text on the simulator.

Types

t()

@type t() :: %Orchard.SimulatorServer{
  device_type: String.t(),
  monitor_ref: reference() | nil,
  name: String.t(),
  runtime: String.t(),
  state: String.t(),
  udid: String.t()
}

Functions

boot(udid)

Boots the simulator if it's not already booted.

child_spec(init_arg)

Returns a specification to start this module under a supervisor.

See Supervisor.

get_state(udid)

Gets the current state of the simulator.

install_app(udid, app_path)

Installs an app on the simulator.

launch_app(udid, bundle_id, args \\ [])

Launches an app on the simulator.

screenshot(udid, output_path)

Takes a screenshot of the simulator.

shutdown(udid)

Shuts down the simulator.

start_link(simulator_info)

Starts a SimulatorServer for the given simulator.

tap(udid, x, y)

Performs a tap at the given coordinates.

type_text(udid, text)

Types text on the simulator.