title: Swift 3.0 cannot convert value of type (_, _)->() to Expected argument type 'ObjectsOrErrorBlock'
body: <p>I've used typedef in objective-c to define a completion block like so:</p>
  
  <pre><code>typedef void(^ObjectsOrErrorBlock) (NSArray* objects, NSError* error);
  </code></pre>
  
  <p>I then have a Swift 3.0 function that takes the ObjectsOrErrorBlock as a parameter. When I try to use the function I receive the error mentioned in the title. This is how I'm attempting to call it:</p>
  
  <pre><code>BPDKAPIClient.shared().getLeadSources({ (leadSourceNames, error) in
  
      self.replaceAll(leadSourceNames.flatMap({$0}))
  })
  </code></pre>
  
  <p>This is how Xcode autofills my function:</p>
  
  <pre><code>BPDKAPIClient.shared().getLeadSources { ([Any]?, Error?) in
      code
  }
  </code></pre>
  
  <p>What's wrong with the way I'm calling the function? How should I be calling it?</p>
  
  <p>So it was pointed out that the question is similar to:
  <a href="https://stackoverflow.com/questions/26286160/calling-objective-c-typedef-block-from-swift">Calling objective-C typedef block from swift</a>
  where the solution was an instance method is being called on a non-instance object (aka BPDAPIClient). The shared() function actually returns an instance of instancetype so the getLeadSources method isnt being called on a non-instance object it's being called on some instance. This is how shared is defined:</p>
  
  <pre><code>+ (instancetype) sharedClient;
  
  + (instancetype)sharedClient {
  
      static BPDKAPIClient *sharedMyManager = nil;
      static dispatch_once_t onceToken;
      dispatch_once(&amp;onceToken, ^{
          sharedMyManager = [[self alloc] init];
  
          // Set the client configuration to be the default.
          BPDKAPIClientConfiguration* defaultConfig =     [BPDKAPIClientConfiguration defaultConfiguration];
          [sharedMyManager setApiClientConfig:defaultConfig];
          [sharedMyManager setAppSource:@""];
      });
  
      //TODO: add logic to allow first pass at shared manager to be allowed, but subsuquent must check that we called "setAppId:ClientKey:Environment"
  
      return sharedMyManager;
  }
  </code></pre>