Skip to content

Print Disconnect message when a device connection is lost #442

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 19, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions src/ios-deploy/ios-deploy.m
Original file line number Diff line number Diff line change
Expand Up @@ -1900,6 +1900,14 @@ void device_callback(struct am_device_notification_callback_info *info, void *ar
NSLogVerbose(@"Handling device type: %d", AMDeviceGetInterfaceType(info->dev));
handle_device(info->dev);
}
break;
case ADNCI_MSG_DISCONNECTED:
{
CFStringRef device_uuid = AMDeviceCopyDeviceIdentifier(info->dev);
NSLogOut(@"[....] Disconnected %@", device_uuid);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be great to also log to the JSON output stream somthing like

NSLogJSON(@{@"Event": @"DeviceDisconnected", @"Device": get_device_json_dict(info->dev)});

CFRelease(device_uuid);
break;
}
default:
break;
}
Expand Down