title: XCode Test Automation For IPhone
body: <p>I would like to have my iphone test app to be tested automatically in an IPhone. The following are the steps I would like to have:</p>
  
  <ol>
  <li>compile, link and code sign the iphone app (Xcodebuild)</li>
  <li>upload the newly built app to iphone </li>
  <li>run the uploaded app in iphone automatically</li>
  <li>collect the result from the gdb console</li>
  <li>close the app</li>
  </ol>
  
  <p>Right now, I have problem with step 2 and 3 where I cannot do it automatically (I can do it from XCode via "Build and Debug" button. This, however, will require manual clicking).</p>
  
  <p>I did some research on automator and it does not answer my problem. Another option I am thinking about is to have the app compiled for iphone simulator and run it from there, but I am not sure how accurate the test result will be comparing to the real device.</p>
  
  <p>I am new to Mac/IPhone development, perhaps someone has a better way of testing this. Any feedback and input are welcome. Thanks.</p>