I have been converting my code to swift 3. I have an issue with since verification:
This is the code I have:
verification.initiate { (success:Bool, error:Error?) -> Void in
//handle outcome
if (success){
print("successfully requested phone verification")
//segue to next screen
self.performSegue(withIdentifier: "xxx", sender: nil)
} else {
let alert = UIAlertController(title: "Alert", message: error?.localizedDescription, preferredStyle: .alert)
alert.addAction(UIAlertAction(title: "Ok", style: .default, handler: nil))
self.present(alert, animated: true, completion: nil)
print(error?.localizedDescription)
self.buttonsEnable(true)
}
}
Xcode is returning the following error:
Cannot convert value of type '(Bool, Error?) -> Void' to expected argument type '(InitiationResult, Error?) -> Void'
Any ideas on how to fix this? I have updated to the latest version of the sdk.