title: Inconsistent 'Unknown type name' error in protocol referencing NSManagedObject subclasses
body: <p>I have two protocols declared in my project. The first one I wrote is named <code>SSSelectingCategory.h</code></p>
  
  <pre><code>#import &lt;Foundation/Foundation.h&gt;
  
  @protocol SSSelectingCategory &lt;NSObject&gt;
  
  @required
  @property (nonatomic, strong) SSCategory *selectedCategory;
  
  @end
  </code></pre>
  
  <p>The second one is <code>SSSelectingIcon.h</code></p>
  
  <pre><code>#import &lt;Foundation/Foundation.h&gt;
  
  @protocol SSSelectingIcon &lt;NSObject&gt;
  
  @required
  @property (nonatomic, strong) SSIcon *selectedIcon;
  
  @end
  </code></pre>
  
  <p>The strange thing is that the first protocol compiles without any error or warning, while the second one is throwing the <code>Unknown type name 'SSIcon'</code>. </p>
  
  <p>I know the answer to this problem is to use a forward-class declaration in my second protocol like this:</p>
  
  <pre><code>#import &lt;Foundation/Foundation.h&gt;
  @class SSIcon;
  
  @protocol SSSelectingIcon &lt;NSObject&gt;
  
  @required
  @property (nonatomic, strong) SSIcon *selectedIcon;
  
  @end
  </code></pre>
  
  <p>But now this makes me think the <code>SSSelectingCategory.h</code> protocol shouldn't have compiled at all in the first place, as I didn't put any explicit <code>#import</code> or forward-class declaration of any sort.</p>
  
  <p>I could quiet the compiler and go on coding, but I want to understand if there's something weird going on with Xcode or if I'm missing some fine point, as both protocols are really simple. Could there be a problem with the <code>SSCategory</code> and/or <code>SSIcon</code> classes, as they're both <code>NSManagedObject</code>s and there's a relationship connecting the two?</p>