does any one know how to launch ios_webkit_debug_proxy using java code and capture log to make a check if iPhone is connected ?
Thanks in advance!
does any one know how to launch ios_webkit_debug_proxy using java code and capture log to make a check if iPhone is connected ?
Thanks in advance!
Not sure about how to do it in Java, but in Python I do 2 things:
class connected_iPhones():
def __init__(self):
sp = Popen("system_profiler SPUSBDataType -xml", shell=True, stdout=PIPE).communicate()[0]
sys_plist = readPlistFromString(sp)[0]
allowed_devices = ['iphone', 'ipad']
self.connected_devices = {}
for item in sys_plist.get('_items'):
for k, v in item.items():
if k == '_items':
for device in v:
if device.get('_name').lower() in allowed_devices:
self.connected_devices[device.get('serial_num')] = v
else:
sub_array = device.get('_items')
if sub_array is not None:
for device in sub_array:
if device.get('_name').lower() in allowed_devices:
self.connected_devices[device.get('serial_num')] = device
This returns a list of connected devices.