2

I am using FCM for push notifications in my applications. There is a staging and a production server URL.

Do I need to generate two separate google_services.json files for staging and production?

Is it possible/recommended to modify values in the config file?

EDIT:

"project_info": {

"project_number": "xxxxxx",

"firebase_url": "https://stagingUrl",

"project_id": "xxxxxx",

"storage_bucket": "staging url.com"

}

My concern is that for the production server, the URL will also change. So will I need a separate file for this case?

AL.
  • 36,815
  • 10
  • 142
  • 281
vishnus
  • 728
  • 2
  • 7
  • 20
  • why you want to seperate it for staging and live? – Lalit Poptani Oct 04 '16 at 09:29
  • @LalitPoptani want to know whether it should be separate or not? Will the same config file work for both staging and live? – vishnus Oct 04 '16 at 09:33
  • See [this](http://stackoverflow.com/q/30772201/4625829), it might help. – AL. Oct 04 '16 at 09:35
  • @vishnus it depends on your requirement! – Lalit Poptani Oct 04 '16 at 09:40
  • @AL. Thank you.. reading the answers. – vishnus Oct 04 '16 at 09:48
  • @LalitPoptani - I have added code from the google_services.json to the question. Could you tell me whether i need two files or one file now? – vishnus Oct 04 '16 at 09:50
  • 2
    If you are using one firebase project for staging and another for production then you would use two config files like @AL suggested. However if you are using the same project for both staging and production then you can use the same google-services.json file. – Arthur Thompson Oct 07 '16 at 15:50
  • @ArthurThompson - Thank you. I was not aware that the server URL does not matter and is not defined in the config file. – vishnus Oct 08 '16 at 08:31

0 Answers0