且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

Firebase FCM做法(1个项目vs多个应用程序)

更新时间:2023-11-22 16:48:16

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

使用单个项目意味着还使用单个发件人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.

干杯!