I have a project in which I am trying to use Swift for the new modules. For one of the new class, I am using an existing method of an Objective-C class in Swift 3.2.
Following is the signature of the method,
- (BOOL)canLoginWithUsername:(NSString *)username password:(NSString *)password error:(NSError **)error
I am trying to use this method in swift as,
if try loginLogicHandler.canLogin(withUsername: usernameValue, password: passwordValue) as Bool {
}
However, I am getting a compiler error as
Cannot convert value of type () to type 'Bool' in coercion
What should I do to make this working?
Could anyone suggest how to fix this?