iOS Development

ios – Firebase Telephone Auth – PhoneAuthProvider.supplier().verifyPhoneNumber() completion handler shouldn’t be working

I’m following this information for authenticating the person through a code despatched to a cellular quantity. I’ve double checked every step to ensure I did not miss one thing for establishing Firebase and FirebaseAuth up entrance.

Anticipated habits: The completion handler ought to run, printing the “Contained in the verifyPhoneNumber completion handler.” message, in addition to (1) the “Obtained an error attempting to confirm the cellphone quantity.” message OR (2) “Verification ID is OR (3) “Verification ID is nil, however no error was reported”.

Precise habits: None of my print statements are working, which leads me to imagine that the completion handler itself is not working.

I’ve already verified that code proper earlier than this name is runing simply wonderful, so my greatest guess is that one thing about establishing Firebase/FirebaseAuth is not proper. My app builds efficiently and I’ve examined this on each Simulator in addition to an precise machine with the identical outcomes.

        formattedPhoneNumber, uiDelegate: nil)
    { (verificationID, error) in
        print("Contained in the verifyPhoneNumber completion handler.")

        if let error = error {
            print("Obtained an error attempting to confirm the cellphone quantity.")

        if let verificationID = verificationID {
            print("Verification ID is (verificationID)")
        } else {
            print("Verification ID is nil, however no error was reported.")


Leave a Reply

Your email address will not be published. Required fields are marked *

Back to top button