I has project with 2 build types. Every build type has specific applicationIdSuffix.
BuildType : dev , applicationIdSuffix
= .dev
BuildType : prod , applicationIdSuffix
= .prod
In Firebase console I create application for build type = dev.
As result I download file google-services.json
. I put it in c:\myproject\android\app\
In this file "package_name": "com.myproject.dev"
OK. It's work.
Now I in Firebase for the same project, I need to create another application with another buildType = prod.
As result I download NEW file: google-services.json
.
In this file "package_name": "com.myproject.prod"
Where I need to put this second file google-services.json?
Firebase already supports that, you should create a new project, then add 2 new apps for each build type (mypackage.prod and mypackage.dev) or flavor.
Once done, just export the google-services.json of the last created app (dev), the file should contain details of both apps, like the following
"client_info": {
"mobilesdk_app_id": "...",
"android_client_info": {
"package_name": "mypackage.dev"
}
},
"client_info": {
"mobilesdk_app_id": "...",
"android_client_info": {
"package_name": "mypackage.prod"
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With