refactor: device Install interface

This commit is contained in:
lilong.129
2024-10-23 21:02:06 +08:00
parent 4b568dac01
commit b8083cd03e
10 changed files with 51 additions and 29 deletions
+3 -2
View File
@@ -473,8 +473,9 @@ func (dev *IOSDevice) StopPcap() string {
return dev.pcapFile
}
func (dev *IOSDevice) Install(appPath string, opts *InstallOptions) (err error) {
for i := 0; i <= opts.RetryTime; i++ {
func (dev *IOSDevice) Install(appPath string, options ...InstallOption) (err error) {
installOptions := NewInstallOptions(options...)
for i := 0; i <= installOptions.RetryTimes; i++ {
err = builtin.RunCommand("go-ios", "install", "--path="+appPath, "--udid="+dev.UDID)
if err == nil {
return nil