My problem is that I have already published an application, but for future upgrades, I need to test the app with a live database. Is there a way to use a separate Firebase database for testing the app? Alternatively, is there another solution to test the application while it is already deployed?
-
1https://stackoverflow.com/questions/37450439/separate-dev-and-prod-firebase-environment?rq=2 – Muhammad Faiz Abdillah Jul 06 '23 at 05:40
1 Answers
You can achieve this by implementing flavors in your app. This will allow you to have separate google_services.json
for each flavor in case of android and seperate GoogleServices_info.plist
.
Follow this video to implement flavors in your application: Link to Video
Follow this medium article to integrate different firebase projects for each flavor: Link To Medium Article
If you have used flutterfire
cli,then you might need to configure separate
firebase_app_id_file.json
for iOS,for that follow this medium article
Link to Medium Article For Environment Setup
You will need to add build scripts for google_services.json file and GoogleServices_info.plist file, In order to place them at the right location while creating a build. Those scripts are provided in these medium articles.

- 46
- 4