title: Start Instruments from the command line
body: <p>I followed this site to get started with UI Automation.
  <a href="http://blog.manbolo.com/2012/04/08/ios-automated-tests-with-uiautomation#1.2" rel="nofollow">http://blog.manbolo.com/2012/04/08/ios-automated-tests-with-uiautomation#1.2</a></p>
  
  <p>I am trying to start Instruments from the command line. Unfortunately I get an error:</p>
  
  <pre><code>2013-03-14 14:06:36.376 instruments[17854:1207] Connection to the remote device lost while launching target. Aborting...
  2013-03-14 14:06:36.378 instruments[17854:1207] Recording cancelled : At least one target failed to launch; aborting run
  Instruments Trace Error : Failed to start trace.
  </code></pre>
  
  <p>This is the command I used:</p>
  
  <p><code>instruments -w {deviceId} -t /Applications/Xcode.app/Contents/Applications/Instruments.app/Contents/PlugIns/AutomationInstrument.bundle/Contents/Resources/Automation.tracetemplate {appname} -e UIASCRIPT /Path/to/Script.js</code></p>
  
  <p>Currently I am using Xcode 4.6.</p>