Documentation ¶
Index ¶
- func GetMetrics(device ios.DeviceEntry) (func() (map[string]interface{}, error), func() error, error)
- func ListenAppStateNotifications(device ios.DeviceEntry) (func() (map[string]interface{}, error), func() error, error)
- func NewSysmontapService(device ios.DeviceEntry, samplingInterval int) (*sysmontapService, error)
- func StartMJPEGStreamingServer(device ios.DeviceEntry, port string) error
- func VerifyProfileAndType(types []ProfileType, profileTypeIdentifier string, profileIdentifier string) (ProfileType, Profile, error)
- type CPUUsage
- type DeviceInfoService
- func (d *DeviceInfoService) Close()
- func (d DeviceInfoService) HardwareInformation() (map[string]interface{}, error)
- func (d DeviceInfoService) NameForPid(pid uint64) error
- func (d DeviceInfoService) NetworkInformation() (map[string]interface{}, error)
- func (d DeviceInfoService) ProcessList() ([]ProcessInfo, error)
- type DeviceStateControl
- type LocationSimulationService
- type ProcessControl
- func (p *ProcessControl) Close() error
- func (p ProcessControl) KillProcess(pid uint64) error
- func (p *ProcessControl) LaunchApp(bundleID string, my_opts map[string]any) (uint64, error)
- func (p *ProcessControl) LaunchAppWithArgs(bundleID string, my_args []interface{}, my_env map[string]any, ...) (uint64, error)
- func (p ProcessControl) StartProcess(bundleID string, envVars map[string]interface{}, arguments []interface{}, ...) (uint64, error)
- type ProcessInfo
- type Profile
- type ProfileType
- type ScreenshotService
- type SysmontapMessage
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetMetrics ¶ added in v1.0.90
func ListenAppStateNotifications ¶ added in v1.0.77
func NewSysmontapService ¶ added in v1.0.152
func NewSysmontapService(device ios.DeviceEntry, samplingInterval int) (*sysmontapService, error)
NewSysmontapService creates a new sysmontapService - samplingInterval is the rate how often to get samples, i.e Xcode's default is 10, which results in sampling output each 1 second, with 500 the samples are retrieved every 15 seconds. It doesn't make any correlation between the expected rate and the actual rate of samples delivery. We can only conclude, that the lower the rate in digits, the faster the samples are delivered
func StartMJPEGStreamingServer ¶ added in v1.0.128
func StartMJPEGStreamingServer(device ios.DeviceEntry, port string) error
func VerifyProfileAndType ¶ added in v1.0.24
func VerifyProfileAndType(types []ProfileType, profileTypeIdentifier string, profileIdentifier string) (ProfileType, Profile, error)
VerifyProfileAndType checks that the given string profileTypeIdentifier and profileIdentifier are contained in the given types.
Types ¶
type DeviceInfoService ¶ added in v1.0.7
type DeviceInfoService struct {
// contains filtered or unexported fields
}
DeviceInfoService gives us access to retrieving process lists and resolving names for PIDs
func NewDeviceInfoService ¶ added in v1.0.7
func NewDeviceInfoService(device ios.DeviceEntry) (*DeviceInfoService, error)
NewDeviceInfoService creates a new DeviceInfoService for a given device
func (*DeviceInfoService) Close ¶ added in v1.0.7
func (d *DeviceInfoService) Close()
Close closes up the DTX connection
func (DeviceInfoService) HardwareInformation ¶ added in v1.0.79
func (d DeviceInfoService) HardwareInformation() (map[string]interface{}, error)
HardwareInformation gets some nice extra details from Instruments. Here is an example result for an old iPhone 5: map[hwCPU64BitCapable:1 hwCPUsubtype:1 hwCPUtype:16777228 numberOfCpus:2 numberOfPhysicalCpus:2 speedOfCpus:0]
func (DeviceInfoService) NameForPid ¶ added in v1.0.7
func (d DeviceInfoService) NameForPid(pid uint64) error
NameForPid resolves a process name for a given pid
func (DeviceInfoService) NetworkInformation ¶ added in v1.0.79
func (d DeviceInfoService) NetworkInformation() (map[string]interface{}, error)
NetworkInformation gets a list of all network interfaces for the device. Example result: map[en0:Wi-Fi en1:Ethernet Adaptor (en1) en2:Ethernet Adaptor (en2) lo0:Loopback pdp_ip0:Cellular (pdp_ip0) pdp_ip1:Cellular (pdp_ip1) pdp_ip2:Cellular (pdp_ip2) pdp_ip3:Cellular (pdp_ip3) pdp_ip4:Cellular (pdp_ip4)]
func (DeviceInfoService) ProcessList ¶ added in v1.0.7
func (d DeviceInfoService) ProcessList() ([]ProcessInfo, error)
ProcessList returns a []ProcessInfo, one for each process running on the iOS device
type DeviceStateControl ¶ added in v1.0.24
type DeviceStateControl struct {
// contains filtered or unexported fields
}
DeviceStateControl allows to access the ConditionInducer so we can set device states like
"SlowNetworkCondition" and "SlowNetwork3GGood".
Use the List() command to get all available ProfileType and Profile combinations. Then use Enable() and Disable() to control them.
func NewDeviceStateControl ¶ added in v1.0.24
func NewDeviceStateControl(device ios.DeviceEntry) (*DeviceStateControl, error)
NewDeviceStateControl creates and connects a new DeviceStateControl that is ready to use
func (DeviceStateControl) Disable ¶ added in v1.0.24
func (d DeviceStateControl) Disable(pType ProfileType) error
Disable deactivates the currently active profileType
func (DeviceStateControl) Enable ¶ added in v1.0.24
func (d DeviceStateControl) Enable(pType ProfileType, profile Profile) error
Enable activates a given profileType and profile received from a List command. Note, that the device will automatically deactivate the profile if this dtx connection closes f.ex. when the process is terminated. Make sure to keep it open if you use this and use the Disable command.
func (DeviceStateControl) List ¶ added in v1.0.24
func (d DeviceStateControl) List() ([]ProfileType, error)
List returns a list of all available profile types and profiles.
type LocationSimulationService ¶ added in v1.0.122
type LocationSimulationService struct {
// contains filtered or unexported fields
}
LocationSimulationService gives us access to simulate device geo location
func NewLocationSimulationService ¶ added in v1.0.122
func NewLocationSimulationService(device ios.DeviceEntry) (*LocationSimulationService, error)
NewLocationSimulationService creates a new LocationSimulationService for a given device
func (*LocationSimulationService) Close ¶ added in v1.0.122
func (d *LocationSimulationService) Close()
Close closes up the DTX connection
func (*LocationSimulationService) StartSimulateLocation ¶ added in v1.0.122
func (d *LocationSimulationService) StartSimulateLocation(lat, lon float64) error
StartSimulateLocation sets geolocation with provided params
func (*LocationSimulationService) StopSimulateLocation ¶ added in v1.0.122
func (d *LocationSimulationService) StopSimulateLocation() error
StopSimulateLocation clears simulated location
type ProcessControl ¶
type ProcessControl struct {
// contains filtered or unexported fields
}
func NewProcessControl ¶
func NewProcessControl(device ios.DeviceEntry) (*ProcessControl, error)
func (*ProcessControl) Close ¶
func (p *ProcessControl) Close() error
func (ProcessControl) KillProcess ¶
func (p ProcessControl) KillProcess(pid uint64) error
KillProcess kills the process on the device.
func (*ProcessControl) LaunchApp ¶
LaunchApp launches the app with the given bundleID on the given device.LaunchApp Use LaunchAppWithArgs for passing arguments and envVars. It returns the PID of the created app process.
func (*ProcessControl) LaunchAppWithArgs ¶ added in v1.0.147
func (p *ProcessControl) LaunchAppWithArgs(bundleID string, my_args []interface{}, my_env map[string]any, my_opts map[string]any) (uint64, error)
LaunchApp launches the app with the given bundleID on the given device.LaunchApp It returns the PID of the created app process.
func (ProcessControl) StartProcess ¶
func (p ProcessControl) StartProcess(bundleID string, envVars map[string]interface{}, arguments []interface{}, options map[string]interface{}) (uint64, error)
StartProcess launches an app on the device using the bundleID and optional envvars, arguments and options. It returns the PID.
type ProcessInfo ¶ added in v1.0.7
type ProcessInfo struct { IsApplication bool Name string Pid uint64 RealAppName string StartDate time.Time }
ProcessInfo contains all the properties for a process running on an iOS devices that we get back from instruments
type ProfileType ¶ added in v1.0.24
type ProfileType struct { ActiveProfile string Identifier string ProfilesSorted bool IsActive bool Name string IsDestructive bool IsInternal bool Profiles []Profile }
ProfileType a profile type we can activate
type ScreenshotService ¶ added in v1.0.128
type ScreenshotService struct {
// contains filtered or unexported fields
}
func NewScreenshotService ¶ added in v1.0.128
func NewScreenshotService(device ios.DeviceEntry) (*ScreenshotService, error)
func (*ScreenshotService) Close ¶ added in v1.0.128
func (d *ScreenshotService) Close()
func (*ScreenshotService) TakeScreenshot ¶ added in v1.0.128
func (d *ScreenshotService) TakeScreenshot() ([]byte, error)