invertase / flutterfire_cli

A CLI to help with using FlutterFire in your Flutter applications.
Apache License 2.0
164 stars 47 forks source link

request: flutterfire config option to select destination for 'firebase_app_id_file.json' generated file in ios folder #304

Closed DamienMrtl closed 4 days ago

DamienMrtl commented 4 weeks ago

Is there an existing feature request for this?

Command

flutterfire config

Description

When using flavors with flutter ios, I have two firebase project dev and prod. I need to select a destination folder for this generated file 'firebase_app_id_file.json' so I can generate one file for each of my flavors.

Reasoning

It can cause problems because the default file is generated in ios/ folder and if I run my flutterfire configure dev command it can replace the prod infos when rewriting the file.

Additional context and comments

No response

russellwheatley commented 4 days ago

If you're using the latest FlutterFire CLI version:

dart pub global activate flutterfire_cli 1.0.1-dev.1

It automatically stores this file in your local .dart_tool/ directory for each flavour you configure. If you're setting it up on another computer, you just need to run flutterfire reconfigure, and it will add the files to the local .dart_tool directory (for each flavor).

Hope this helps

DamienMrtl commented 2 days ago

Thank you I added these parameters for dev and prod flavors: --ios-build-config=Release-prod \ --ios-out=/ios/config/prod/GoogleService-Info.plist \

And it seems to work. But the resulting firebase.json file is generated at root of my projetct and not inside .dart_tool lik you said but not an issue for me.