Firebase FCM practices (1 project vs multiple apps

2020-02-10 10:09发布

I just updated my GCM implementation to Firebase.

I started with creating a FCM project and added one of my apps to it. When I got to my second app, I created a new FCM project, but then found out I could link multiple apps to one project, so I linked the second app to my first project as well.

Now I have all my apps linked to one project and it works well, still I wonder if this is the best (most sensible!?) way to do it. Because now everytime I download the "google-services.json" there is config stuff in it for ALL my linked apps, even though I don't need it in my current app (and I am not sure if I can delete the superfluous stuff (can I?)).

Are there any other ramifications for having one project only or is it even a good thing?

1条回答
来,给爷笑一个
2楼-- · 2020-02-10 10:38

Are there any other ramifications for having one project only or is it even a good thing?

Using a single project means a single Sender ID is also used. I think that you can refer to this answer by @TrevorJohns (quoting the only necessary paragraph, for your concern.. I think):

Developers are perfectly welcome (and encouraged) to use the same sender ID / API key for all of their apps.


everytime I download the "google-services.json" there is config stuff in it for ALL my linked apps, even though I don't need it in my current app (and I am not sure if I can delete the superfluous stuff (can I?)).

I tried it out (added an app, downloaded the google-services.json, deleted the details of the other app (make sure you don't delete the details of the app you want), copied it to the Application folder) and everything worked fine.

Cheers!

查看更多
登录 后发表回答