Tuesday, 23 March 2021

Use multiple google-services.json and GoogleService-Info.plist files in one flavor/target

Is it possible to use two google-services.json files in an Android project? I know that there is a possibility to use multiple google-services.json files for multiple flavors, but is it possible to somehow merge two files with different project_info and use them simultaneously for a project?

Below is the example of two files which I want to use in one project and one flavor (one for Analytics and another one for Ads).

First google-services.json

{
  "project_info": {
    "project_number": "XXXXXXXXXXXX",
    "project_id": "project-one"
  },
  "client": [
    (...)
  ],
  "configuration_version": "1"
}

Second google-services.json

{
  "project_info": {
    "project_number": "YYYYYYYYYYYY",
    "firebase_url": "https://project-two.firebaseio.com",
    "project_id": "project-two",
    "storage_bucket": "project-two.appspot.com"
  },
  "client": [
    (...)
  ],
  "configuration_version": "1"
}

Also I have the same question regarding GoogleService-Info.plist files for an iOS project.



from Use multiple google-services.json and GoogleService-Info.plist files in one flavor/target

No comments:

Post a Comment