Hey.
I'm trying to launch Instruments from shell with iPhone specified as target. As for this apple doc I should be able to specify target with '-w' parameter but I don't know what should be there.
I've tried iPhone name, I've tried its UUID but nothing worked - constantly I get 'Unknown hardware device specified'. I also checked content of some saved trace document, but inside I see UUID of the iPhone. Maybe it is some prefix/suffix that should be added to the UUID ?
In the end i would like to get the following working:
instruments -t /Users/user/Template.tracetemplate -D /Users/user/res.trace -w iPhoneID AppName
The following command worked for me(taken from http://lemonjar.com/blog/?p=69):
instruments -t /Developer/Platforms/iPhoneOS.platform/Developer/Library/Instruments/PlugIns/AutomationInstrument.bundle/Contents/Resources/Automation.tracetemplate <full_path_to_application> -e UIASCRIPT <path_to_script.js> -e UIARESULTSPATH <output_results_path>
There a few important things to note though:
full_path_to_application is the path to your .app file that is created by your simulator. For me, the path was
this path might be different for anyone else depending on what iOS version are you running on your simulator. Also remember to put this path in double quotation marks.
The path_to_script.js should be the FULL PATH to where your automation script written in javascript is saved. Also remember to put this path in double quotation marks.
Lastly output results path is the path where you want to save the output results. Also remember to put this path in double quotation marks.
These were the points I had been missing on and thus was getting some of the errors mentioned above.
The hex "Identifier" value you find in the Organizer in the device's general information pane should work.