Documentation ¶
Overview ¶
Package appservice provides functions to Launch and Kill apps on an iOS devices for iOS17+.
Index ¶
- Constants
- type Connection
- func (c *Connection) Close() error
- func (c *Connection) KillProcess(pid int) error
- func (c *Connection) LaunchApp(bundleId string, args []interface{}, env map[string]interface{}, ...) (int, error)
- func (c *Connection) LaunchAppWithStdIo(bundleId string, args []interface{}, env map[string]interface{}, ...) (LaunchedAppWithStdIo, error)
- func (c *Connection) ListProcesses() ([]Process, error)
- func (c *Connection) Reboot() error
- func (c *Connection) RebootWithStyle(style string) error
- type LaunchedAppWithStdIo
- type Process
Constants ¶
const ( // RebootFull is the style for a full reboot of the device. RebootFull = "full" // RebootUserspace is the style for a reboot of the userspace of the device. RebootUserspace = "userspace" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Connection ¶
type Connection struct {
// contains filtered or unexported fields
}
Connection represents a connection to the appservice on an iOS device for iOS17+. It is used to launch and kill apps and to list processes.
func New ¶
func New(deviceEntry ios.DeviceEntry) (*Connection, error)
New creates a new connection to the appservice on the device for iOS17+. It returns an error if the connection could not be established.
func (*Connection) Close ¶
func (c *Connection) Close() error
Close closes the connection to the appservice
func (*Connection) KillProcess ¶
func (c *Connection) KillProcess(pid int) error
KillProcess kills the process with the given PID for iOS17+.
func (*Connection) LaunchApp ¶
func (c *Connection) LaunchApp(bundleId string, args []interface{}, env map[string]interface{}, options map[string]interface{}, terminateExisting bool) (int, error)
LaunchApp launches an app on the device with the given bundleId and arguments for iOS17+. On a successful launch it returns the PID of the launched process.
func (*Connection) LaunchAppWithStdIo ¶
func (c *Connection) LaunchAppWithStdIo(bundleId string, args []interface{}, env map[string]interface{}, options map[string]interface{}, terminateExisting bool) (LaunchedAppWithStdIo, error)
LaunchAppWithStdIo launches an app and connects to the stdio-socket the returned value implements the io.ReadWriteCloser interface and needs to be closed when finished using the stdio-socket
func (*Connection) ListProcesses ¶
func (c *Connection) ListProcesses() ([]Process, error)
ListProcesses returns a list of processes with their PID and executable path running on the device for iOS17+.
func (*Connection) Reboot ¶
func (c *Connection) Reboot() error
Reboot performs a full reboot of the device for iOS17+. Just calls RebootWithStyle with RebootFull.
func (*Connection) RebootWithStyle ¶
func (c *Connection) RebootWithStyle(style string) error
RebootWithStyle performs a reboot of the device with the given style for iOS17+. For style use RebootFull or RebootUserSpace.
type LaunchedAppWithStdIo ¶
type LaunchedAppWithStdIo struct { Pid int // contains filtered or unexported fields }
LaunchedAppWithStdIo is the launched app with a connection to the stdio-socket
func (LaunchedAppWithStdIo) Close ¶
func (a LaunchedAppWithStdIo) Close() error
Close closes the connection to stdio-socket of the launched app
type Process ¶
Process represents a process running on the device for iOS17+. It contains the PID and the path of the process.
func (Process) ExecutableName ¶
ExecutableName returns the executable name for a process by removing the path.