(device screencapture.IosDevice)
| 446 | } |
| 447 | |
| 448 | func checkDeviceIsPaired(device screencapture.IosDevice) { |
| 449 | dev, err := ios.GetDevice(screencapture.Correct24CharacterSerial(device.SerialNumber)) |
| 450 | if err != nil { |
| 451 | printErrJSON(err, "device not found, is it still connected?") |
| 452 | os.Exit(1) |
| 453 | } |
| 454 | allValues, err := ios.GetValuesPlist(dev) |
| 455 | if err != nil { |
| 456 | printErrJSON(err, "failed getting deviceinfo, you need to pair the device before running qvh") |
| 457 | os.Exit(1) |
| 458 | } |
| 459 | log.Infof("found %s %s for udid %s", allValues["DeviceName"], allValues["ProductVersion"], dev.Properties.SerialNumber) |
| 460 | } |
| 461 | |
| 462 | func printErrJSON(err error, msg string) { |
| 463 | printJSON(map[string]interface{}{ |
no test coverage detected