Skip to content

Commit

Permalink
fix: 修复部分低版本设备无法启动wda的问题
Browse files Browse the repository at this point in the history
Signed-off-by: Eason <[email protected]>
  • Loading branch information
ZhouYixun authored Jul 24, 2023
1 parent e3e0a17 commit 86f07d1
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions xctestmanagerdaemon.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,15 @@ func (d *xcTestManagerDaemon) initiateControlSession(XcodeVersion uint64) (err e

selector := "_IDE_initiateControlSessionWithProtocolVersion:"

var ret *libimobiledevice.DTXMessageResult
if ret, err = d.testmanagerd.invoke(selector, args, d.channelCode, true); err != nil {
var _ *libimobiledevice.DTXMessageResult
if _, err = d.testmanagerd.invoke(selector, args, d.channelCode, true); err != nil {
return err
}

if nsErr, ok := ret.Obj.(libimobiledevice.NSError); ok {
return fmt.Errorf("%s", nsErr.NSUserInfo.(map[string]interface{})["NSLocalizedDescription"])
}
// Some device should ignore it.
// if nsErr, ok := ret.Obj.(libimobiledevice.NSError); ok {
// return fmt.Errorf("%s", nsErr.NSUserInfo.(map[string]interface{})["NSLocalizedDescription"])
// }
return
}

Expand Down

0 comments on commit 86f07d1

Please sign in to comment.