title: Bridging Swift Initialisers to Objective C
body: <p>I'm attempting to slowly migrate an Objective C app over to Swift and have started to create new classes -</p>
  
  <pre><code>public class MapsAPI : NSObject {
  
      let delegate: MapsAPIResponseDelegate
  
      public init(managerWithDelegate delegate: MapsAPIResponseDelegate) {
          self.delegate = delegate
      }
  
  }
  </code></pre>
  
  <p>Now in my Objective C <code>.m</code> file I've declared <code>#import MyTarget-Swift.h</code> and in my <code>.h</code> I've added <code>@class MapsAPI</code> which all seems fine however I'm not sure what the Objective C initialisation code should look like. I've tried -</p>
  
  <pre><code>MapsAPI *api = [[MapsAPI alloc] initWithManagerWithDelegate: self];
  </code></pre>
  
  <p>But that errors with -</p>
  
  <blockquote>
    <p>No visible @interface for 'MapsAPI' declares the selector
    'initWithManagerWithDelegate:'</p>
  </blockquote>
  
  <p>I've tried looking at the definition of my <code>MyTarget-Swift.h</code> but all that shows is - </p>
  
  <pre><code>SWIFT_CLASS("_TtC4What7MapsAPI")
  @interface MapsAPI : NSObject
  - (nonnull instancetype)init SWIFT_UNAVAILABLE;
  @end
  </code></pre>
  
  <p>Is there something I'm doing wrong here?</p>