Discussions

Ask a Question
Back to all

How can I dynamically change the firebase configurations in .net maui application?

I am working on building a .Net MAUI Application. During the Application initialization in the program.cs, I am registering the Firebase services. However, after the startup, when the login screen comes, the user has the option to choose the configuration (Dev, Prod, Pre). I want to update the Firebase configurations based on user selection. By default, it is set to Prod during the Initial load because the prod config details are mentioned in the google-services.json and google service-info. list files.

In my google-services.json and Info. list files, by default, the prod Server ID is mentioned which gets initialized in MAUIProgram.cs.

I tried updating the configurations by passing the keys after user selection. But it did not work. I guess IOS does not allow you to update the Info.plist file and Android does not allow it to initialize again.

Regards: Cracksjet