appservice

package
v1.0.122 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 28, 2024 License: MIT Imports: 12 Imported by: 0

Documentation

Overview

Package appservice provides functions to Launch and Kill apps on an iOS devices for iOS17+.

Index

Constants

View Source
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 AppLaunch

type AppLaunch struct {
	Pid int
}

AppLaunch represents the result of launching an app on the device for iOS17+. It contains the PID of the launched app.

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) (AppLaunch, error)

LaunchApp launches an app on the device with the given bundleId and arguments for iOS17+.

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 Process

type Process struct {
	Pid  int
	Path string
}

Process represents a process running on the device for iOS17+. It contains the PID and the path of the process.

func (Process) ExecutableName

func (p Process) ExecutableName() string

ExecutableName returns the executable name for a process by removing the path.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL