@Test public void testListUdids() { String[] udids = IDevice.listUdids(); assertTrue(udids.length > 0); System.out.println(Arrays.asList(udids)); }
public static String[] listUdids() { StringArrayOut devicesOut = new StringArrayOut(); IntOut countOut = new IntOut(); try { checkResult(LibIMobileDevice.idevice_get_device_list(devicesOut, countOut)); StringArray devices = devicesOut.getValue(); int count = countOut.getValue(); String[] udids = new String[count]; for (int i = 0; i < count; i++) { udids[i] = devices.get(i); } return udids; } catch (LibIMobileDeviceException e) { if (e.getErrorCode() == IDeviceError.IDEVICE_E_NO_DEVICE.swigValue()) { return new String[0]; } throw e; } finally { devicesOut.delete(); countOut.delete(); } }
IDevice implements AutoCloseable { public static String[] listUdids() { StringArrayOut devicesOut = new StringArrayOut(); IntOut countOut = new IntOut(); try { checkResult(LibIMobileDevice.idevice_get_device_list(devicesOut, countOut)); StringArray devices = devicesOut.getValue(); int count = countOut.getValue(); String[] udids = new String[count]; for (int i = 0; i < count; i++) { udids[i] = devices.get(i); } return udids; } catch (LibIMobileDeviceException e) { if (e.getErrorCode() == IDeviceError.IDEVICE_E_NO_DEVICE.swigValue()) { return new String[0]; } throw e; } finally { devicesOut.delete(); countOut.delete(); } } }
IDevice implements AutoCloseable { public static String[] listUdids() { StringArrayOut devicesOut = new StringArrayOut(); IntOut countOut = new IntOut(); try { checkResult(LibIMobileDevice.idevice_get_device_list(devicesOut, countOut)); StringArray devices = devicesOut.getValue(); int count = countOut.getValue(); String[] udids = new String[count]; for (int i = 0; i < count; i++) { udids[i] = devices.get(i); } return udids; } catch (LibIMobileDeviceException e) { if (e.getErrorCode() == IDeviceError.IDEVICE_E_NO_DEVICE.swigValue()) { return new String[0]; } throw e; } finally { devicesOut.delete(); countOut.delete(); } } IDevice(IDeviceRef ref);  IDevice(String udid); }
IDevice implements AutoCloseable { public static String[] listUdids() { StringArrayOut devicesOut = new StringArrayOut(); IntOut countOut = new IntOut(); try { checkResult(LibIMobileDevice.idevice_get_device_list(devicesOut, countOut)); StringArray devices = devicesOut.getValue(); int count = countOut.getValue(); String[] udids = new String[count]; for (int i = 0; i < count; i++) { udids[i] = devices.get(i); } return udids; } catch (LibIMobileDeviceException e) { if (e.getErrorCode() == IDeviceError.IDEVICE_E_NO_DEVICE.swigValue()) { return new String[0]; } throw e; } finally { devicesOut.delete(); countOut.delete(); } } IDevice(IDeviceRef ref);  IDevice(String udid); String getUdid(); IDeviceConnection connect(int port); synchronized void dispose(); @Override void close(); static void setDebugLevel(int level); static String[] listUdids(); static void addEventListener(EventListener listener); static void removeEventListener(EventListener listener); static void main(String[] args); }
IDevice implements AutoCloseable { public static String[] listUdids() { StringArrayOut devicesOut = new StringArrayOut(); IntOut countOut = new IntOut(); try { checkResult(LibIMobileDevice.idevice_get_device_list(devicesOut, countOut)); StringArray devices = devicesOut.getValue(); int count = countOut.getValue(); String[] udids = new String[count]; for (int i = 0; i < count; i++) { udids[i] = devices.get(i); } return udids; } catch (LibIMobileDeviceException e) { if (e.getErrorCode() == IDeviceError.IDEVICE_E_NO_DEVICE.swigValue()) { return new String[0]; } throw e; } finally { devicesOut.delete(); countOut.delete(); } } IDevice(IDeviceRef ref);  IDevice(String udid); String getUdid(); IDeviceConnection connect(int port); synchronized void dispose(); @Override void close(); static void setDebugLevel(int level); static String[] listUdids(); static void addEventListener(EventListener listener); static void removeEventListener(EventListener listener); static void main(String[] args);  }