title: Importing a Swift protocol in Objective-C class
body: <p>I try to import a Swift Protocol named <code>AnalyticProtocol</code> into an Objective-C class named <code>AnalyticFactory</code>.</p>
  
  <pre><code>protocol AnalyticProtocol
  {
  
  }
  </code></pre>
  
  <p><strong>I'm starting from an existing Objective-C project (I didn't create a new Swift project with xCode and I didn't found how configure my Objective-C project to be a Swift project in xCode 6</strong>).</p>
  
  <p>In my Swift file I included the <code>.h</code> file named <code>MyProjectName-Swift.h</code> but the compiler return me an error telling me that <strong>it doesn't exist</strong>.
  So, I created a <code>.h</code> file named <code>MyProjectName-Swift.h</code> which is actually empty (I don't know what I should put inside).</p>
  
  <p>In the <a href="https://developer.apple.com/library/prerelease/ios/documentation/Swift/Conceptual/BuildingCocoaApps/MixandMatch.html#//apple_ref/doc/uid/TP40014216-CH10-XID_77">Apple documentation</a> they said that I have to include my <code>.h</code> file named <code>MyProjectName-Swift.h</code> in my <code>.m</code> file. But I need to include it not into my <code>.m</code>file but into my <code>.h</code>. Does this can be problematic?</p>
  
  <p>When I try to compile I've got this error: <strong>:0: error: xxxAnalyticFactory.h:39: cannot find protocol declaration for 'AnalyticProtocol'</strong></p>
  
  <p>And the incriminated code:</p>
  
  <pre><code>@interface AnalyticFactory : NSObject
  {
      Class&lt;AnalyticProtocol&gt; _analyticProtocolClass; // The type of the analytic class currently used.
  }
  </code></pre>
  
  <p>I think I don't understand well how can I import a Swift protocol into an Objective-C class. </p>
  
  <p>Does anyone see an error in what I'm doing?</p>