【发布时间】:2016-09-18 20:52:51
【问题描述】:
我刚刚将我的 Xcode 更新为 Xcode8,并将项目转换为 swift 3。
在此处输入登录功能:
Firth. Auth()?.signIn(withEmail: self.EmailTF.text!, password: self.PasswordTF.text!, completion: { (user: FIRUser?, error: NSError?) in
if let error = error {
print(error.localizedDescription)
} else {
self.ref.child("UserProfile").child(user!.uid).setValue([
"email": self.EmailTF.text!,
"name" : self.NameTF.text!,
"phone": self.PhoneTF.text!,
"city" : self.CityTF.text!,
])
print("Sucess")
}
})
我收到此错误:
cannot convert value of type '(FIRUser?, NSError?) -> ()' to expected argument type 'FIRAuthResultCallback?'
swift 3 中的替换是什么?
【问题讨论】:
标签: ios swift firebase firebase-authentication swift3