title: Type arguments cannot be applied to non-class type 'id'
body: <p>I am new to ObjectiveC and have been working for few years in Swift. Therefore, I don't understand the below explained error in Xcode:</p>
  <blockquote>
  <p>Type arguments cannot be applied to non-class type 'id'</p>
  </blockquote>
  <p>My Protocol:</p>
  <pre><code>@protocol ExampleProtocol&lt;NSObject&gt;
  @required
          
  -(NSString *)title;
  -(NSString *)album;
      
  @end
  </code></pre>
  <p>My implementation in the MyService.h file:</p>
  <pre><code>@interface MyService : NSObject 
  @property (nonatomic, assign, readwrite) id&lt;ExampleProtocol&gt; delegate;
  @end
  </code></pre>
  <p>The error occurs in the line:</p>
  <pre><code>&gt; @property (nonatomic, assign, readwrite) id&lt;ExampleProtocol&gt; delegate;
  </code></pre>
  <p>Additionally:</p>
  <ul>
  <li>I have imported the required file .h in which the ExampleProtocol code is located in the MyService.m file</li>
  <li>Added the <code>@class ExampleProtocol;</code> in my MyService.h file at the top.</li>
  </ul>
  <p>Also tried:</p>
  <ul>
  <li><p>Creating a Swift protocol with <code>@objc</code> and <code>: class</code> imported over the app-Bridging.h gives me the same result with the same error message.</p>
  </li>
  <li><p>Clean build</p>
  </li>
  <li><p>Clean build folder (removed derived data)</p>
  <p>The only thing that did work was to remove the line from the public interface to the private. This doesn't make sense. I wan't to set the delegate from another class and creating a public setter which set the private delegate is ugly workaround.</p>
  </li>
  </ul>
  <p>Any suggestion would be helpfull. I would like to understand why this happens. There are a lot of other protocols in my project written in ObjectiveC which work fine.</p>