Swift class in Objective C Project
<p>I'm having problems executing some Swift code in an existing ObjC project. This is my first attempt at Swift so I'm sure I'm missing something simple.</p>
<p>I have added my new swift file to my project - this process generated the bridging header. So now I have the following:</p>
<h3>bridging-header file</h3>
<pre><code>//
//  Use this file to import your target's public headers 
//  that you would like to expose to Swift.
//

#import &quot;historyViewController.h&quot;
</code></pre>
<p>In my swift file I have the following test class and function:</p>
<pre><code>import Foundation

@objc class Hello: NSObject {
    func sayHello() {
        print(&quot;Hi There&quot;)
    }
}
</code></pre>
<p>In my <em>historyViewController.m</em> file I have the following</p>
<pre><code>#import &quot;xx-Bridging-Header.h&quot;
</code></pre>
<p>In my <em>historyViewController.h</em> file I have the following</p>
<pre><code>@class Hello;
</code></pre>
<p>How do I actually go about executing the <code>sayHello</code> function from within my <em>historyViewController.m</em> file? I've tried <code>[Hello sayHello];</code> - but get 'no known class method'.</p>