Ionic + Firebase Build for iOS and Android Not Working/Complex Issues

my team and I have tried everything when it comes to taking our Ionic app that uses Firebase and getting it to work for iOS and Android. The app works perfectly fine with the command 'ionic serve' and utilizes Firebase with no issues whatsoever. The issues arise however when we try to build the app for Android or iOS.

When we build it using normal methods and tutorials, the app is stuck on an indefinite loading screen because it is not interacting with Firebase. From there however we assumed that the app was not able to connect to the Firebase project. So we decided to try adding the Firebase dependencies in the gradle files for Android and the pod files for iOS. However doing so has caused a plethora of other issues and problems while building the application. Not only that, but it seems like every bug we fix causes other issues somewhere. This is literally the last thing we have to do and we've been at it for a week and a half with no luck.

What We Need: We need someone who has experience taking an Ionic app that uses Firebase and getting it to work for an iOS and Android release build. There are many tutorials online for how to get Firebase to work with Ionic as well as how to build an Ionic application for iOS and Android. There are absolutely no tutorials(or none that we could find) in how to get an Ionic application with Firebase working on iOS and Android. This issue may also take a while to solve, so we may ask for more help from people who can give us answers.

If you can help us with this issue, we would greatly appreciate it. We are college students so we don't have much capital, but we will do what we can! We are stuck in a bind here and we have gotten everything else to work. We have learned quite a lot from this journey and it would absolutely suck if we were to give up here! We just really need some help, thank you in advance!