title: Coinbase iOS SDK Completion Block
body: <p>I am using Swift 4 and I am trying to use OAuth via Coinbase's SDK.</p>
  
  <p>This is how I'm calling the final step to completing the OAuth:</p>
  
  <pre><code>    CoinbaseOAuth.finishAuthentication(for: url, clientId: Constants.CLIENT_ID, clientSecret: Constants.CLIENT_SECRET, completion: { (result : AnyObject?, error: NSError?) -&gt; Void in
  
      } as! CoinbaseCompletionBlock)
  </code></pre>
  
  <p>When I first typed this out I did not have <code>as! Coinbase CompletionBlock</code> but Xcode complained and said I needed to add it.</p>
  
  <p>When I looked at the method signature I see the completion block type:</p>
  
  <pre><code>+ (void)finishOAuthAuthenticationForUrl:(NSURL *)url
                                 clientId:(NSString *)clientId
                             clientSecret:(NSString *)clientSecret
                               completion:(CoinbaseCompletionBlock)completion;
  </code></pre>
  
  <p>So I dig a little deeper and look at the <code>CoinbaseCompletionBlock</code> definition: </p>
  
  <p><code>typedef void (^CoinbaseCompletionBlock)(id response, NSError *error);</code></p>
  
  <p>When I try to run the code I get an unhelpful error message:
  <a href="https://i.stack.imgur.com/DT3Ku.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/DT3Ku.png" alt="enter image description here"></a></p>
  
  <p>Does anyone see why this might be causing an issue?</p>