mirror of
https://github.com/httprunner/httprunner.git
synced 2026-06-08 09:19:41 +08:00
feat: add uixt tool list_packages
This commit is contained in:
@@ -317,6 +317,18 @@ func (dev *IOSDevice) GetDeviceInfo() (*DeviceDetail, error) {
|
||||
return detail, err
|
||||
}
|
||||
|
||||
func (dev *IOSDevice) ListPackages() ([]string, error) {
|
||||
apps, err := dev.ListApps(ApplicationTypeAny)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
var packages []string
|
||||
for _, app := range apps {
|
||||
packages = append(packages, app.CFBundleIdentifier)
|
||||
}
|
||||
return packages, nil
|
||||
}
|
||||
|
||||
func (dev *IOSDevice) ListApps(appType ApplicationType) (apps []installationproxy.AppInfo, err error) {
|
||||
svc, _ := installationproxy.New(dev.DeviceEntry)
|
||||
defer svc.Close()
|
||||
|
||||
Reference in New Issue
Block a user