Crash when signInWithPhoneNumber
I'm trying to use signinWithPhoneNumber, but it is always crashing with the following message:
Please register custom URL scheme 'com.googleusercontent.apps.711281515158-jccuuigsa4851bub2f1dfo5qcfihd469' in the app's Info.plist file.' was thrown while invoking signInWithPhoneNumber on target RNFirebaseAuth with params ( "__FIRAPP_DEFAULT", 2392159312, 2538, 2539 )
I followed all steps to configure RNFirebase on the project, from npm package to XCode stuff. What I'm doing wrong?
Environment
-
Application Target Platform: iOS
-
Development Operating System: Mac OS High Sierra
-
Build Tools: XCode 9
-
React Native version: 0.49.3
-
RNFirebase Version: 3.0.5
-
Firebase Module: auth
@ararog you need to follow steps 1 & 2 from the official firebase ios docs to add the url schema. Note that this also will not work on an emulator, phone auth requires a physical device.
Link: https://firebase.google.com/docs/auth/ios/phone-auth
If it helps, when enabling Auth, is required to download the GoogleService-info again.
Thank you @gusgard, that's not an obvious thing to do and it was just what I needed.
Hey guys, sorry reopening this thread, but I've made the steps 1 and 2 to enable silent notifications, but my react native app is crashing asking for configure the URL link is need for recaptcha mode. when I configure this url, everything runs fine, but in the middle of the process, firebase still opening the Verifying If you're not a robot.
I definitely need help with that...
Kind of stuck on this, just tried to setup the phone auth and getting 'Please register custom url scheme'. What should i do?
I fixed it by following the steps in #2 to enable recaptcha verification, specifically:
Add custom URL schemes to your Xcode project:
Open your project configuration: double-click the project name in the left tree view. Select your app from the TARGETS section, then select the Info tab, and expand the URL Types section.
Click the + button, and add a URL scheme for your reversed client ID. To find this value, open the GoogleService-Info.plist configuration file, and look for the REVERSED_CLIENT_ID key. Copy the value of that key, and paste it into the URL Schemes box on the configuration page. Leave the other fields blank.
@lucasfernandes I was also surprise there is no guide for that! I just spent the whole afternoon on this silent notifications not working and reCaptcha always showing when authenticating with phone number... I think that should be part of a guide on Medium.com lol
There is more stuff that needs to be done actually and you get it from reading that blog: https://firebase.googleblog.com/2017/01/debugging-firebase-cloud-messaging-on.html

The additional part that I have missed that helped me to solved this:
- Install Cloud Messaging Module from RNFirebase https://rnfirebase.io/docs/v4.0.x/messaging/ios
- Install Notifications Module in RNFirebase https://rnfirebase.io/docs/v4.0.x/notifications/ios
Hope it will help someone else
@tevatahiti just tried your suggestion and tried 2. install notifications module and I get the error on #import "RNFirebaseNotifications.h", file not found. I was able to get FCM working, but didn't see an additional pod install for notifications specifically. Am I missing something? Also a bit confused on the overlap between notifications and messaging - I had assumed that messaging also installs remote notifications - is that incorrect?
@mypark do you have a version of your app already working with ReCaptcha? If yes then once you installed Cloud Messaging module and Notifications module:
- xcode : clean derivated data
- xcode : clean project
- in pod folder : pod update
- sometimes it also helps to clean everything and reboot your mac Hope it can help
@tevatahiti rebooting seems to have helped - though I'm not importing notifications, just FCM.
Besides, no need to have a real iOS device for testing phone authentication. You just need to set test phone numbers and code in firebase settings.
@mypark save my day