0

I currently have a "dev" instance of the Firestore configured for my iOS project in Flutter. Originally I followed this guide and everything went smoothly.

Now, however, I also need to configure a separate "production" instance of Firestore for the production environment while also keeping the existing dev one.

Looking through the docs, there doesn't seem to be a way of achieving this through the flutterfire CLI alone.

My question is, what should be done exactly for 2 or more Firebase environments to be configured for a Flutter app on iOS? Do I need to "roll back" everything that was added by the CLI and re-configure everything manually?

Alex Lomia
  • 6,705
  • 12
  • 53
  • 87
  • For managing multiple environments it's best to create 2 separate projects for each of your environments as `dev` and `prod`, according to this [thread](https://stackoverflow.com/questions/37450439/separate-dev-and-prod-firebase-environment) and it's content links – Rohit Kharche Mar 22 '23 at 09:33
  • Hi does that answer your issue ? – Rohit Kharche Mar 27 '23 at 13:51
  • Hey, not exactly. Flutterfire generates all the necessary artifacts like plist files, etc. I was expecting that there'd be some kind of a solution to switching out those configs seamlessly between the envs. So far it looks like the best way to go about this is to use Flutter flavors – Alex Lomia Mar 28 '23 at 00:02
  • Yes as Flutter flavors allow you to use dependencies based on env, that should do the trick for you. – Rohit Kharche Mar 28 '23 at 08:11

0 Answers0