How do I list iPhones and iPads currently connected to my MAC??

To run UI tests on actual devices, I use the following command to list devices possibly connected to my MAC:

xcrun xctrace list devices

As you know it shows a list of simulators and actual devices. BUT it also shows actual devices NOT currently connected to my MAC. If they are not currently connected, I do not wish to see them.

Once a device is connected, it seems to always show up in the [== Devices ==] list. Even after I disconnect the device it will still show up there. And my software thinks it can run tests on these devices.

Does anyone know how to get a correct list of devices which are currently connected to the MAC??

Post not yet marked as solved Up vote post of dunamase Down vote post of dunamase
318 views