I have this function in Swift
class func someFunction(idValue: Int, completionHandler: @escaping (_ jsonData: JSON) -> ()) {
(...)
if (some validation) {
completionHandler(jsonData)
} else {
completionHandler(JSON.null)
}
}
Now I want to call that function from Objective-C. What I am doing is this:
[[ClassName new] someFunction:self.sesionId completionHandler:^{
}];
But is throwing "No visible @interface for 'ClassName' declares the selector 'someFunction:completionHandler:'
How can I call this function?