From 00a39c8180fcdf14beaf7e61d9564150a098c6b2 Mon Sep 17 00:00:00 2001 From: marc hoffman Date: Mon, 14 Dec 2020 09:39:51 -0400 Subject: [PATCH] Show iOS version and build version in "Device found" message (#491) Show iOS version and build version in "Device found" message --- src/ios-deploy/ios-deploy.m | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/ios-deploy/ios-deploy.m b/src/ios-deploy/ios-deploy.m index 1ef585d5..c3a89753 100644 --- a/src/ios-deploy/ios-deploy.m +++ b/src/ios-deploy/ios-deploy.m @@ -412,11 +412,13 @@ CFStringRef get_device_full_name(const AMDeviceRef device) { NSLogVerbose(@"Architecture Name: %@", arch_name); NSLogVerbose(@"Product Version: %@", product_version); NSLogVerbose(@"Build Version: %@", build_version); + if (build_version == 0) + build_version = CFStringCreateWithCString(NULL, "", kCFStringEncodingUTF8); if (device_name != NULL) { - full_name = CFStringCreateWithFormat(NULL, NULL, CFSTR("%@ (%@, %@, %@, %@) a.k.a. '%@'"), device_udid, model, model_name, sdk_name, arch_name, device_name); + full_name = CFStringCreateWithFormat(NULL, NULL, CFSTR("%@ (%@, %@, %@, %@, %@, %@) a.k.a. '%@'"), device_udid, model, model_name, sdk_name, arch_name, product_version, build_version, device_name); } else { - full_name = CFStringCreateWithFormat(NULL, NULL, CFSTR("%@ (%@, %@, %@, %@)"), device_udid, model, model_name, sdk_name, arch_name); + full_name = CFStringCreateWithFormat(NULL, NULL, CFSTR("%@ (%@, %@, %@, %@, %@, %@)"), device_udid, model, model_name, sdk_name, arch_name, product_version, build_version); } AMDeviceDisconnect(device);