T.N*_*han 5 ios firebase swift firebase-authentication
重新验证后,页面仅返回空白。下一步不执行任何操作。
屏幕截图

对于空白的重新验证码页面问题,我可以通过执行以下 3 件事来解决它:
第一件事——
GoogleSerivce-Info.plist文件确认REVERSED_CLIENT_ID被添加到您的项目通过使用此URL类型。遵循第二步的第一部分:将自定义 URL 方案添加到您的 Xcode 项目(查看屏幕截图)。第二件事——
在项目导航器中选择 blue project icon
选择 Capabilities
打开 Background Modes
选择 Background fetch
第三件事——
PhoneAuthProvider.provider(auth: Auth.auth())@IBAction func phoneButton(sender: UIButton) {
// ***step 5***
PhoneAuthProvider.provider(auth: Auth.auth())
PhoneAuthProvider.provider().verifyPhoneNumber(phoneNumberTextField.text!, uiDelegate: nil) {
(verificationID, error) in
if let error = error {
print(error.localizedDescription)
return
}
guard let verificationId = verificationID else { return }
// do something with verificationID
}
}
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
951 次 |
| 最近记录: |