title: Calling Swift from Objective C, closure to block?
body: <p>I started converting an Objective c project to Swift.
  First thing I am converting is the network layer.
  I'm trying to write my network layer in Swift in a way that it can be called from objective c.</p>
  
  <p>The problem is in my swift code I'm passing closures to a method. It works in Swift, but doesn't seem like when generating header files it generates method definition for any method that is using closures?</p>
  
  <p>Is there a workaround for this, or any way where I could have a swift method that takes a closure/block?</p>
  
  <p><strong>Swift class</strong></p>
  
  <pre><code>@objc public class UserNetworkManager: BaseNetworkManager {
  
     // I can call this from objective c
     public func fetchSomething() {
  
     }
  
     // I can't call this from objective c
     public func fetchFriends(userId: String, completion: ([User]?, NSError?)-&gt;()) -&gt; Request {
  
     }
  
  }
  </code></pre>
  
  <p><strong>Generated Header</strong></p>
  
  <pre><code>SWIFT_CLASS("_TtC12Company19UserNetworkManager")
  @interface UserNetworkManager : BaseNetworkManager
  - (void)fetchSomething;
  @end
  </code></pre>