title: iPhone Unit Tests Hang; Fail to Call -applicationDidFinishLaunching:
body: <p>I have unit tests set up for my iPhone project built using the <a href="http://code.google.com/p/google-toolbox-for-mac/wiki/iPhoneUnitTesting" rel="nofollow noreferrer">Google Toolkit for Mac</a> framework on top of OCUnit. I have a dependent project called "Unit Tests" that builds and runs the tests as needed.</p>
  
  <p>But then it all stopped working, for no reason that I can fathom. Suddenly, my "Unit Tests" executable launches and just sits there, waiting, forever. It never gets as far as the Application Delegate's <code>-applicationDidFinishLaunching:</code> method, which is what calls the actual unit tests. Inserting an NSLog into the delegate's <code>-init</code> method tells me that that method gets called, but the application never "finishes" launching.</p>
  
  <p>If I modify the shell script that runs the "Unit Tests" executable and take out the <code>-RegisterForSystemEvents</code> argument, the executable exists immediately (it runs no tests) and gives me the following message:</p>
  
  <blockquote>
    <p>Terminating since there is no system event server.<br>
    (Run the EventPump or pass the argument "-RegisterForSystemEvents" if you want to run without SpringBoard.</p>
  </blockquote>
  
  <p>Since it terminates when I remove that argument, I'm curious what exactly that argument does and how, since it would seem to be causing the hang. But since no tests run without it, I need to determine how I can get it working again. However, Google doesn't provide links to anything relevant to the current situation, and nothing in the dev docs is helpful.</p>
  
  <p>Any ideas?</p>