For a long time I was having trouble using the firebase authentication system for phone numbers in ionic + capacitor. I got so frustrated I put it on the backburner and made a long post about it on stackoverflow (https://stackoverflow.com/questions/66573679/ionic-capacitor-firebase-phone-number-authentication-problems) I have finally got it working using the https://github.com/baumblatt/capacitor-firebase-auth library and https://github.com/angular/angularfire library. So thank you to those coders <3
Before you start, it is recommended that you are experienced with ionic, capacitor, and firebase.
Make sure you replace the GoogleServices-Info.plist in the ios project and add your firebaseConfig specs in the environment folder
It should look like this at the end:
On line 17 in home.page.ts make sure you set phoneNum to the phone number of your phone
Run npm install
, then run ios cap sync
Navigate to your the Xcode .workspace project in ios/App/App.workspace and setup your signing certificate.