We are looking at migrating away from a pure react-react native project to a project using the Expo SDK, and I’m curious to know how you can use different environments in expo. We have two firebase projects, one for staging and one for production. Currently in our react native project, we determine which GoogleService-Info.plist file to use in our AppDelegate file based on if the build is debug or not. Is there a way to do something similar in expo, or would we simply have to have two firebase initialize statements and use comments to change which is being used?
Hey @cshanno, I know plenty of users have different staging/production environments, basically you want to conditionally initialize a firebase project depending on whether it’s run in production or development?
I think the best way to do this is by checking the Constants.manifest key, which gives access to this object, and you can check the
Expo also provides release channels, but I don’t think this is what you’re looking for (thought I’d mention it in case, though)/
Is this applicable for standalone apps or only in dev? When I build the app as a standalone and distribute it, it crashes until I remove the code checking the manifest object.
This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.