title: Cocoa: What's the difference between importing in the header and importing in the main file?
body: <p>I've no idea why, but on occasion I've managed to fix some compile errors, most notably </p>
  
  <pre><code>error expected specifier-qualifier-list before 'someClass'
  </code></pre>
  
  <p>by moving <code>#import "someClass.h"</code> from the .h file into the .m file. This has also worked with a couple of other problems i've encountered that have been (mysteriously from my point of view) related to headers. </p>
  
  <p>Some cursory googling has turned up the answer "never import headers in header file" and that's where the advice stops. </p>
  
  <p>Either I've completely made this up, or I've picked up the habit from somewhere, but I thought the header was where headers were meant to be imported. Clearly not, but can anyone explain to me why that is, and what's the preferred way of importing headers?</p>