Firebase FCM做法(1个项目vs多个应用程序) [英] Firebase FCM practices (1 project vs multiple apps)

查看:69
本文介绍了Firebase FCM做法(1个项目vs多个应用程序)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我刚刚将GCM实现更新为Firebase.

I just updated my GCM implementation to Firebase.

我从创建FCM项目开始,并向其中添加了我的一个应用程序. 当我进入第二个应用程序时,我创建了一个新的FCM项目,但后来发现我可以将多个应用程序链接到一个项目,因此我也将第二个应用程序也链接到了我的第一个项目.

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.

现在,我所有的应用程序都链接到一个项目,并且运行良好,但我仍然想知道这是否是最好的方法(最明智!!). 因为现在每次下载"google-services.json"时,所有链接的应用程序中都包含配置内容,即使我当前的应用程序中不需要它(而且我不确定是否可以删除多余的内容) (我可以吗?)).

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?

推荐答案

仅拥有一个项目还有其他影响吗?甚至是一件好事吗?

使用单个项目意味着还使用单个发件人ID.我认为您可以参考@TrevorJohns的答案(为您的关注,引用了唯一必要的段落. ):

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):

非常欢迎(并鼓励)开发人员对其所有应用程序使用相同的发件人ID/API密钥.

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


每次我下载"google-services.json"时,所有链接的应用程序中都包含配置内容,即使我当前的应用程序中不需要它(而且我不确定是否可以删除多余的内容(可以吗?).

我尝试了一下(添加了一个应用程序,下载了google-services.json,删除了另一个应用程序的详细信息(确保您不删除所需应用程序的详细信息),然后将其复制到了Application文件夹中),一切正常.

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.

干杯!

这篇关于Firebase FCM做法(1个项目vs多个应用程序)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆