0
我一直在我的代碼轉換爲SWIFT 3.我有一個問題,因爲與驗證:Sinch驗證雨燕3
這是我的代碼有:
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是返回以下錯誤:
Cannot convert value of type '(Bool, Error?) -> Void' to expected argument type '(InitiationResult, Error?) -> Void'
有關如何解決此問題的任何想法?我已更新到最新版本的SDK。
謝謝。我只是不確定如何檢查成功與錯誤 –