I have a doubt about the real-life workflow for an Expo App I am building for an MVP.
I started with one Firebase project, and when I wanted to implement push notifications, everything went well: I added an Android App to the Firebase project, uploaded the server key, and everything is working fine.
Now, I created two additional projects, let’s call them [project]-staging and [project]-development:
- [project]-development is for… development
- [project]-staging for internal testing of specific features once finalized
- [project] would be the master for the production variant
Everything is fine, I am using APP_ENV for the variants, --project to deploy functions to the right project, and will use release channels to manage OTA updates.
Now, the topic of this entry: notifications. They are set up with 1 Android App that I have set for the [project], and everything works well (I just make sure that the Expo Tokens are deleted/updated properly in the users’ collection), and Server Key is set.
Yet, looks like I can’t avoid creating 1 Android App per project, or at least for [project]-staging/production, if I want to add crash reports or use app distribution for testing. I tried to do it, I can load the right google-services.json file based on the built environment, I use the right experienceID as well, BUT that’s not enough: as far as I can read in this Forum I can’t set up a Server Key per project (e.g. using --project=staging), so at all time only one of the Android App will have working notifications… is that right, or am I missing something, or just confused about this topic?
The question is: what are the best practices for multiple environments real-world apps?
How do I properly set up push notifications (plus crashlytics/app distribution) if I need multiple projects/apps but I can only use one Server Key at a time?
Thanks in advance,