I've been attempting to create a delete request to remove a specific record from my custom objects using SFRestAPI. The code I've written so far is;
let deleteRequest = SFRestAPI.sharedInstance().performDelete(withObjectType: "Event__c", objectId: "Event-00003", fail: { (error :NSError!) -> Void in} as! SFRestFailBlock, complete: SFRestDictionaryResponseBlock)
However, this immediately throws error saying;
Cannot convert value of type 'SFRestDictionaryResponseBlock.Type' (aka '((Optional>) -> ()).Type') to expected argument type 'SFRestDictionaryResponseBlock' (aka '(Optional>) -> ()')
I've been able to get around this issue by casting the Fail block as NSError of type SFRestFailBlock this however doesn't seem to work for Complete Block in swift.
Salesforce SDK Type Definitions for Blocks are
public typealias SFRestFailBlock = (Error?) -> Swift.Void
public typealias SFRestDictionaryResponseBlock = ([AnyHashable : Any]?) -> Swift.Void
Any help will be appreciated, thanks in advance.