Ionic vue app with firebase doesn't work (can't login to firebase) when built for ios in xcode


I have an ionic vue app with firebase for the backend including Firebase auth, firestore, functions etc.

The app performs as expected when run on web. But when I build for ios (for instance via xcode), i can’t login via firebase auth anymore. I understand there’s a 3rd party cordova plugin that seems to handle such cases but is there any other way without using a 3rd party plugin? How do you handle this? Any help of guidance is very much appreciated.


you are really going to need to show something for people to review to provide some support other than saying you wrote some code and it doesn’t work… can you be more specific, what errors are you seeing?

Sorry. didn’t think about that since i used standard js api of firebase (didn’t use any 3rd party library wrappers). Basically like this:

firebase.initializeApp(firebaseConfig) for initializing the firebase project
firebase.auth().signInWithEmailAndPassword(email, password) for logging in

So, this works when i run the web app with ionic serve and connects to the firebase emulator with no issues.

But when I build it for ios, it doesn’t login neither when running with xcode simulator nor with with the iphone.

Do i need to go into the ios folder and do some manual setup there?

So you are trying to connect to the fire base emulator? You didn’t mention that in original post… need to see how you configured the code to connect to the emulator.

Was going to also write this down but you were quicker than me. It also doesn’t login when I use the remote firebase project (instead of the local emulator).

I did some more research and came across this issue in github. Might be related to this. I’ll try this first before wasting more time of yours.


For those whoever face the same issue, the github link i put above has the solution which worked for me. :man_dancing: