How to configure different FCM credentials based on deployment phase?

In an attempt to get notifications to work, I configured the google services file in app.json, however this file references the firebase project id which differs for me between production and development.

How would you configure expo.android.googleServicesFile to change between production and development phases?

Hi @0x80,

What do you mean by ‘in an attempt to get notifications to work’? Were you having trouble with the Expo Notifications API?
I’m not sure whether you can configure that field to change between production and dev phases (asides from manually). Maybe you could override the value using an environment variable? But that’s just an idea

I should have phrased that differently. Notifications are working, but this is the first time I’m doing this and now my dev project is hardcoded into my config, so I was considering this “not quite there yet”…

I know how to override a variable with env in javascript, but because the app config is json I don’t know. Isn’t it very common to have a different firebase project for production?

The guide here doesn’t mention anything about this: Using FCM

Anyone? If I’m not being clear let me know please :slight_smile:

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.