I have made a success & failure block in objC and I am trying to use that function in swift. Getting error, I'm stuck on it please help me.

**Objective C :** 

```
  -(void)registerAppWithSuccessBlock:(void (^)(id responseObject))success andFailureBlock:(void (^)(NSError *error))failure{}

```

I am calling the same function in swift its showing error.

**Swift :** 

```
  USSecService.sharedInstance().registerAppWithSuccessBlock({(responseObject : AnyObject) -> Void in{code}
    }, andFailureBlock: { (error : NSError) -> Void in  {code}
  })

```

**Getting this Error :** 

```
   Cannot invoke 'registerAppWithSuccessBlock' with an argument list of type '((AnyObject) -> Void, andFailureBlock: (NSError) -> Void)'

```