Hi Alexis,
Thanks for Reply, Actually I am trying to get iPhone device which is connected to mac machine using java code by sending commands to the terminal. After that passing UDID, Device Name and Device Version to capabilities. Currently I am trying to the below ways, but not displaying anything in console.
Code 1:
String[] arguments = new String[] {"/usr/local/bin/mobiledevice", "list_devices"};
Process p =Runtime.getRuntime().exec(arguments);
BufferedReader r = new BufferedReader(new InputStreamReader(p.getInputStream()));
String line = "";
String allLine = "";
while((line=r.readLine()) != null)
{
System.out.println(line);
}
Code 2:
String[] str = {"/bin/bash", "-c", "ios-deploy -c"};
Process p = Runtime.getRuntime().exec(str);
BufferedReader r = new BufferedReader(new InputStreamReader(p.getInputStream()));
String line = "";
String allLine = "";
while((line=r.readLine()) != null)
{
System.out.println(line);
}
Please correct me if I am doing wrong.