feat: add uixt tool list_packages

This commit is contained in:
lilong.129
2025-05-21 16:24:54 +08:00
parent 044eb07a35
commit 495443a2c4
7 changed files with 49 additions and 1 deletions

View File

@@ -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()