refactor: move install options to pkg/uixt/options/install

This commit is contained in:
lilong.129
2025-02-06 16:45:40 +08:00
parent 0accec04a9
commit b22f24cb6b
9 changed files with 58 additions and 55 deletions

View File

@@ -323,8 +323,8 @@ func (dev *IOSDevice) NewDriver(opts ...options.DriverOption) (driverExt *Driver
return driverExt, nil
}
func (dev *IOSDevice) Install(appPath string, opts ...InstallOption) (err error) {
installOpts := NewInstallOptions(opts...)
func (dev *IOSDevice) Install(appPath string, opts ...options.InstallOption) (err error) {
installOpts := options.NewInstallOptions(opts...)
for i := 0; i <= installOpts.RetryTimes; i++ {
var conn *zipconduit.Connection
conn, err = zipconduit.New(dev.d)
@@ -343,7 +343,7 @@ func (dev *IOSDevice) Install(appPath string, opts ...InstallOption) (err error)
return err
}
func (dev *IOSDevice) InstallByUrl(url string, opts ...InstallOption) (err error) {
func (dev *IOSDevice) InstallByUrl(url string, opts ...options.InstallOption) (err error) {
appPath, err := builtin.DownloadFileByUrl(url)
if err != nil {
return err