Firebase & iOS 15 -Cannot Contact Recaptcha. Check Your Connection and Try Again

Viewed 1510

Last night I updated all of the pods. I'm using

Firebase (8.9.1)
Firebase/Auth (8.9.1)
Firebase/Messaging (8.9.1)
FirebaseAnalytics (8.9.1)
FirebaseCore (8.9.1)
FirebaseCoreOnly (8.9.1)
//... everything is 8.9.1

Today I submitted my app to App Review and I got a message about the Recaptcha not loading.

I submitted 2 apps and both of them couldn't pass the Recaptcha in iOS 15 but on my end I have a device that runs iOS 13 and another device that runs iOS 14 and the Recaptcha works fine for both apps. I even it ran it on the simulator and the Recaptcha worked for both apps. I have the test phone number that use to login in registered as a test number in Firebase. I can login with the number without any issues.

Even though it's been a few months since my last AppStore update this never happened with any of my previous submissions. I never changed any of the code between my last update and today.

I'm wondering is this an iOS 15 issue?

Guideline 2.1 - Performance - App Completeness

We discovered one or more bugs in your app.

Specifically, we still encountered an error message at the login. Please see the attached screenshot(s) for your reference.

Review device details:

  • Device type: iPhone and iPad
  • OS version: iOS 15.1

Next Steps

Please run your app on a device to reproduce the issues, then revise and submit your app for review. If at first you're unable to reproduce the issue, try the following:

  • For new apps, uninstall all previous versions of your app from a device, then install and follow the steps to reproduce.
  • For app updates, install the new version as an update to the previous version, then follow the steps to reproduce.

If we misunderstood the intended behavior of your app, please reply to this message in Resolution Center to provide information on how these features were intended to work.

Here is the screenshot that they sent. It was the same for both apps.

enter image description here

2 Answers

After deploying several new builds which all got rejected by the App Review team, I finally passed.

I followed this github. Look for the answers by @rignaneseleo and @diegogarcia). They both say to set this to .unknown as in Auth.auth().setAPNSToken(deviceToken, type: .unknown)

In AppDelegate I have:

func application(_ application: UIApplication, didRegisterForRemoteNotificationsWithDeviceToken deviceToken: Data) {
        
        Messaging.messaging().apnsToken = deviceToken
        Messaging.messaging().setAPNSToken(deviceToken, type: MessagingAPNSTokenType.prod)
        Auth.auth().setAPNSToken(deviceToken, type: .unknown) // Setting this to .unknown is what seems to have helped
}

And I followed this answer by @sajedeNouri

set the Identifier to Client in the "URL Types" in the Info of the project.

enter image description here

I had the same issue, I got the same error message from the reviewer, when I looked at the backend, an account was created with the reviewer email, but the phone was not verified. making this feature as an optional will not help as well, as long as the error is producible on your app, it will be rejected. It is not a network issue from the reviewer side, however, it is triggered by them in the sandboxing environment, silent push notification is one of the major causes of this issue, if that is the case with you, you need to enable push notification capability in xCode even if you’re not using it. create the APN key, and upload it to firebase, and add the URL schemes exactly as in your GoogleService-Info.plist

Related