title: TARGET_OS_IPHONE and ApplicationTests
body: <p>Why doesn't this code work when compiling an ApplicationTests unit test bundle?</p>
  
  <pre><code>#if TARGET_OS_IPHONE
     #import &lt;Foundation/Foundation.h&gt;
     #import &lt;UIKit/UIKit.h&gt;
  #else
     #import &lt;Cocoa/Cocoa.h&gt;
  #endif
  </code></pre>
  
  <p>One of my dependencies has this check and compiles just fine in my main application bundles, but it tries to load <code>&lt;Cocoa/Cocoa.h&gt;</code> when compiling my ApplicationTests bundle. It's probably just my lack of understanding of Xcode, but I get nervous when my test bundles don't build. Any suggestions?</p>