title: Can preprocessor directives be used to import different header files for Mac and iOS?
body: <p>I am writing a class library for Mac OS X and iOS to be released as a Cocoa Framework for OS X and a Static Library for iOS. To simplify matters, I intend to use multiple targets in Xcode. However, the classes on Mac OS X link against Cocoa.h whereas on iOS they link against Foundation.h.</p>
  
  <p>My questions basically are:</p>
  
  <ul>
  <li>Could the Mac OS X framework link against Foundation.framework instead? Classes used within the framework are NSString, NSMutableString, and NSMutableArray.</li>
  <li><p>Or could I use preprocessor directives within the header files to control framework inclusion, e.g.</p>
  
  <pre><code>#ifdef MacOSX
      #import &lt;Cocoa/Cocoa.h&gt;
  #else
      #import &lt;Foundation/Foundation.h&gt;
  #endif
  </code></pre></li>
  </ul>