 <p>The problem is that you try to call an instance function without having an actual instance at hand.</p> <p>You either have to create an instance and call the method on that instance:</p> <pre><code>let instance = APISFAuthentication(...) instance. sfAuthenticateUser(...) </code></pre> <p>or define the function as a class function:</p> <pre><code>class func sfAuthenticateUser(userEmail: String) -&gt; Bool { ... } </code></pre> <p><strong>Explanation:</strong></p> <p>What Xcode offers you and what confuses you is the class offers the capability to get a reference to some of its instance functions by passing an instance to it:</p> <pre><code>class ABC { func bla() -&gt; String { return "" } } let instance = ABC() let k = ABC.bla(instance) // k is of type () -&gt; String </code></pre> <p><code>k</code> now <em>is</em> the function <code>bla</code>. You can now call <code>k</code> via <code>k()</code> etc.</p>