title: Success & failure block written in Objective C, showing error in swift
body: <p>I have made a success &amp; failure block in objC and I am trying to use that function in swift. Getting error, I'm stuck on it please help me.</p>
  
  <p><strong>Objective C :</strong> </p>
  
  <pre><code>  -(void)registerAppWithSuccessBlock:(void (^)(id responseObject))success andFailureBlock:(void (^)(NSError *error))failure{}
  </code></pre>
  
  <p>I am calling the same function in swift its showing error.</p>
  
  <p><strong>Swift :</strong> </p>
  
  <pre><code>  USSecService.sharedInstance().registerAppWithSuccessBlock({(responseObject : AnyObject) -&gt; Void in{code}
      }, andFailureBlock: { (error : NSError) -&gt; Void in  {code}
    })
  </code></pre>
  
  <p><strong>Getting this Error :</strong>  </p>
  
  <pre><code>   Cannot invoke 'registerAppWithSuccessBlock' with an argument list of type '((AnyObject) -&gt; Void, andFailureBlock: (NSError) -&gt; Void)'
  </code></pre>