I can get all available devices by "instruments -s device"
I am not able to identify which one is active device. How can i identify active device or simulator programmatically in JAVA.
Please help me.
Thanks.
I can get all available devices by "instruments -s device"
I am not able to identify which one is active device. How can i identify active device or simulator programmatically in JAVA.
Please help me.
Thanks.
This is not done programmatically in JAVA as originally asked, but might help someone.
To get all active iOS physical devices and iOS simulators with their UDIDs:
$ xcrun xctrace list devices
To find the active iOS simulator with its UDID:
$ xcrun simctl list | grep Booted