To enable SMS authentication with Firebase, there are a few things we need to configure, that will allow the app to send SMS to the users.
Enable Phone Authentication in Firebase
In Firebase, go to Authentication -> Sign-in method -> Phone Authentication and check the Enable switch.
Setup
1. Open the GoogleService-Info.plist file in Xcode, and copy the REVERSED_CLIENT_ID value to the clipboard
Make sure that this is your own file which you already downloaded from Firebase at the previous steps. The string will look like this:
com.googleusercontent.apps.525472070731-448dt91ch73bmujeotrvfb280ngguib2
2. In Xcode, select the Info.plist file, right click on it -> Open As -> Source Code
3. In Info.plist source code, under CFBundleURLSchemes paste the client ID string copied at the previous step (by replacing the existing one)
That’s it. Build and run the app again in Xcode, and now you’ll be able to see real SMS texts getting sent to any phone number.