Reputation: 2102
I currently have two applications: A and B. In both there is a common functionality, a message box. When a message is sent to your mailbox, you receive a notification. If the message is sent from application A, it is sent a notification to application A of the destination. Otherwise, it is sent to application B.
The question is: it's better to have a firebase project for each of the applications or there is some way to have both applications in the same project and know which application each user has installed to send the corresponding notification.
Upvotes: 1
Views: 713
Reputation: 598797
All apps in a Firebase project share all resources of that project. So they all share the same Firebase Authentication users, the same (Firestore or Realtime) Databases, and the same Cloud Messaging keys and audiences.
Firebase projects are meant to host a single logical application. If you have an administrative app and an end-user app, a free and a premium version, and then have iOS, Android, and Web versions of all, you have up to 12 variants of the app inside a project, but they're really all just part of the same application.
There are also limits as to how many apps you can add to a Firebase project. The exact limits have varied a bit over time, but if you have more than 30 apps in a project Firebase may prevent you from adding more.
So: if you app A and B are variants of the same application, it's totally fine (and probably a good idea) to add them to the same project. If you have another use-case, keep the guidance above in mind.
Upvotes: 1