<p>It is to my understanding that one should use a forward-class declaration in the event ClassA needs to include a ClassB header, and ClassB needs to include a ClassA header to avoid any circular inclusions. I also understand that an <code>#import</code> is a simple <code>ifndef</code> so that an include only happens once.</p>

<p>My inquiry is this: When does one use <code>#import</code> and when does one use <code>@class</code>? Sometimes if I use a <code>@class</code> declaration, I see a common compiler warning such as the following:</p>

<blockquote>
  <p><code>warning: receiver 'FooController' is a forward class and corresponding @interface may not exist.</code></p>
</blockquote>

<p>Would really love to understand this, versus just removing the <code>@class</code> forward-declaration and throwing an <code>#import</code> in to silence the warnings the compiler is giving me.</p>

Use a forward declaration in the header file if needed, and
```
#import
```
the header files for any classes you're using in the implementation. In other words, you always
```
#import
```
the files you're using in your implementation, and if you need to reference a class in your header file use a forward declaration as well.
The
exception
to this is that you should
```
#import
```
a class or formal protocol you're inheriting from in your header file (in which case you wouldn't need to import it in the implementation).