Documentation
¶
Index ¶
- func AddMedia(ctx context.Context, udid, path string) error
- func Boot(ctx context.Context, udid string) error
- func GetAppContainer(ctx context.Context, udid, bundleID, containerType string) (string, error)
- func GetAppLogs(ctx context.Context, udid, query, duration string) (string, error)
- func GetOrientation(ctx context.Context, udid string) (string, error)
- func InstallApp(ctx context.Context, udid, appPath string) error
- func Launch(_ context.Context, udid, bundleID string) error
- func LaunchApp(ctx context.Context, udid, bundleID string, _ []string) error
- func ListActiveRecordings() []string
- func ListApps(ctx context.Context, udid string) (string, error)
- func ListRunningApps(ctx context.Context, udid string) ([]string, error)
- func OpenURL(ctx context.Context, udid, url string) error
- func Screenshot(ctx context.Context, udid, outputPath, format string) error
- func SetAppearance(ctx context.Context, udid, appearance string) error
- func SetLocation(ctx context.Context, udid string, lat, lon float64) error
- func SetPrivacy(ctx context.Context, udid, action, service, bundleID string) error
- func Shutdown(ctx context.Context, udid string) error
- func StartVideoRecording(ctx context.Context, udid, outputPath, codec string) (string, error)
- func StopVideoRecording(id string) (string, error)
- func Terminate(ctx context.Context, udid, bundleID string) error
- func TriggerSimulatorAction(action string) error
- func UninstallApp(ctx context.Context, udid, bundleID string) error
- type Simulator
- type State
- type VideoRecording
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetAppContainer ¶
GetAppContainer gets the path to an app's container. containerType: "app", "data", "groups", "sile"
func GetAppLogs ¶
GetAppLogs captures recent logs for a process or subsystem udid: target simulator query: can be a bundle ID or process name. We'll search both predicate `process like "query" OR subsystem == "query"` duration: parsed duration string (e.g. "5m") for `log show --last`
func GetOrientation ¶
GetOrientation returns the device orientation (portrait/landscape) by inspecting screenshot dimensions.
func InstallApp ¶
InstallApp installs an .app bundle to a simulator.
func LaunchApp ¶
LaunchApp is a wrapper around Launch to match the devicectl interface. It accepts optional arguments which are currently ignored for simctl basic launch.
func ListActiveRecordings ¶
func ListActiveRecordings() []string
ListActiveRecordings returns all active recording IDs.
func ListRunningApps ¶
ListRunningApps lists running applications (processes ending in .app matching heuristic) Returns a list of application names (executable filenames)
func Screenshot ¶
Screenshot captures a screenshot from the simulator.
func SetAppearance ¶
SetAppearance sets the simulator appearance (light/dark).
func SetLocation ¶
SetLocation sets the simulated location for a device.
func SetPrivacy ¶
SetPrivacy grants or revokes permissions. action: "grant", "revoke", "reset" service: "all", "calendar", "contacts", "location", "location-always", "photos", etc. bundleID: target app
func StartVideoRecording ¶
StartVideoRecording starts recording video from a simulator. Returns a recording ID that can be used to stop the recording.
func StopVideoRecording ¶
StopVideoRecording stops an active recording and returns the output file path.
func TriggerSimulatorAction ¶
TriggerSimulatorAction triggers a hardware action via AppleScript. Supports: "home", "lock", "volume_up", "volume_down", "biometry_match", "biometry_fail"