MCPcopy Create free account
hub / github.com/danielpaulus/quicktime_video_hack / checkDeviceIsPaired

Function checkDeviceIsPaired

main.go:448–460  ·  view source on GitHub ↗
(device screencapture.IosDevice)

Source from the content-addressed store, hash-verified

446}
447
448func 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
462func printErrJSON(err error, msg string) {
463 printJSON(map[string]interface{}{

Callers 1

mainFunction · 0.85

Calls 2

Correct24CharacterSerialFunction · 0.92
printErrJSONFunction · 0.85

Tested by

no test coverage detected