【问题标题】:Firebase is not sending SMS message to my appFirebase 没有向我的应用发送短信
【发布时间】:2020-06-27 03:20:12
【问题描述】:

问题是它有时确实有效,然后在测试过多之后代码无法执行 并且程序库存没有收到任何短信 即使我没有收到任何错误 , 我的登录方法中没有用于测试的号码 ,在我的代码中,我主要是以编程方式完成的,因为我的拙见我的代码很好,我从 firebase 中删除了用户,但它也不起作用

@objc func buttonAction(sender: UIButton!){ 

    PhoneAuthProvider.provider().verifyPhoneNumber(codeTextField.text!+phoneTextField.text!, uiDelegate: nil) { (ID, err) in
                    if let eror = err {

                        print(eror.localizedDescription)
                        AlertController.showAlert(self, titel: "خطا", message: "تاكد من اتصالك بالانترنت")
                       self.sendButton.loadingIndicator(false)
                        self.sendButton.setTitle("إرسال الرمز", for: UIControl.State.normal)

                        return

             }

                    guard let verifyId = ID else {return}
                    self.userDefaults.set(self.phoneTextField.text, forKey: "phone")
                    self.userDefaults.set(self.codeTextField.text, forKey: "ccode")
                    self.userDefaults.set(verifyId, forKey: "verifivationID")
                    self.userDefaults.synchronize()

                    let nextVC = OTP()
                    self.navigationController?.pushViewController(nextVC, animated: true)


                    // Sign in using the verificationID and the code sent to the user
                    // ...
                }

【问题讨论】:

    标签: ios swift xcode firebase-authentication


    【解决方案1】:

    您很可能会受到限制,因为您过于频繁地发送到同一个电话号码。你会想whitelist any phone number that you use for testing,以防止这种情况发生。

    【讨论】:

    • 谢谢,frank 还是同样的错误,应用还是死机
    猜你喜欢
    • 2018-03-14
    • 2019-03-23
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多