Created command line arguments which negate the need to use the command prompts. The following command line arguments have been added:
ios-scheme - pass in the name of the scheme you wish to use for your iOS project.
macos-scheme - pass in the name of the scheme you wish to use for your macOS project.
ios-target- - pass in the name of the target you wish to use for your iOS project.
macos-target- - pass in the name of the target you wish to use for your macOS project.
debug-symbols-ios - This is a command line flag. It will add an upload debug symbols script to your iOS target or scheme (depending on whether you used ios-scheme or ios-target). This replaces debug-symbols-script which was a hidden flag in the last dev release. If you choose to negate the script (i.e. no-debug-symbol-ios), you will not be prompted asking if you wish to write it.
debug-symbols-macos - This is a command line flag. It will add an upload debug symbols script to your macOS target or scheme (depending on whether you used macos-scheme or macos-target). If you choose to negate the script (i.e. no-debug-symbol-macos), you will not be prompted asking if you wish to write it.
overwrite-firebase-options - This is a command line flag. This allows you to overwrite/not overwrite the current firebase_options.dart if you're running flutterfire configure again. If you choose to negate it (i.e. no-overwrite-firebase-options), you will not be prompted asking if you wish to write it.
Notes
You can only set either ios-scheme OR ios-target. If you try to set both, the script will throw an error.
You can only set either macos-scheme OR macos-target. If you try to set both, the script will throw an error.
If you choose ios-scheme or macos-scheme setup, you have to specify a path for ios-out or macos-out. If you don't, you will be prompted by the CLI for a path. This is because it is included in the app bundle at build time, and there needs to be a "GoogleService-Info.plist" in the project directory to use. If you choose the "target" method (i.e. ios-target or macos-target), you do not have to specify a path for "GoogleService-Info.plist" file if you wish (i.e. ios-out or macos-out). This is because the CLI will add the "GoogleService-Info.plist" file to the bundle resources, and it will automatically place the file under the target (e.g. Runner/GoogleService-Info.plist).
I have fixed the conditions used on Bash scripts for build run phases.
Examples of commands that completely negate any user input from prompts:
Note, it is required to specify the Firebase project via --project argument. You also need to include the --yes flag which does a few things. It will automatically choose all platforms on your project (e.g. iOS, macOS, android & web), will overwrite firebase_options.dart (can also use --overwrite-firebase-options for this specific task), it will also force write necessary updates to android build.gradle's for FlutterFire configuration.
Note, the debug symbols scripts are not being written, nor is firebase_options.dart being overwritten. I also removed android-out argument to demonstrate that by default, it will write to android/app/google-services.json as usual.
Note, I was using VGV's CLI to create a project for testing as it has different schemes setup from the beginning (i.e. development, staging, production). macOS schemes will be fixed in a future release, so we use the target again here.
Description
Created command line arguments which negate the need to use the command prompts. The following command line arguments have been added:
ios-scheme
- pass in the name of the scheme you wish to use for your iOS project.macos-scheme
- pass in the name of the scheme you wish to use for your macOS project.ios-target
- - pass in the name of the target you wish to use for your iOS project.macos-target
- - pass in the name of the target you wish to use for your macOS project.debug-symbols-ios
- This is a command line flag. It will add an upload debug symbols script to your iOS target or scheme (depending on whether you usedios-scheme
orios-target
). This replacesdebug-symbols-script
which was a hidden flag in the last dev release. If you choose to negate the script (i.e.no-debug-symbol-ios
), you will not be prompted asking if you wish to write it.debug-symbols-macos
- This is a command line flag. It will add an upload debug symbols script to your macOS target or scheme (depending on whether you usedmacos-scheme
ormacos-target
). If you choose to negate the script (i.e.no-debug-symbol-macos
), you will not be prompted asking if you wish to write it.overwrite-firebase-options
- This is a command line flag. This allows you to overwrite/not overwrite the currentfirebase_options.dart
if you're runningflutterfire configure
again. If you choose to negate it (i.e.no-overwrite-firebase-options
), you will not be prompted asking if you wish to write it.Notes
ios-scheme
ORios-target
. If you try to set both, the script will throw an error.macos-scheme
ORmacos-target
. If you try to set both, the script will throw an error.ios-scheme
ormacos-scheme
setup, you have to specify a path forios-out
ormacos-out
. If you don't, you will be prompted by the CLI for a path. This is because it is included in the app bundle at build time, and there needs to be a "GoogleService-Info.plist" in the project directory to use. If you choose the "target" method (i.e.ios-target
ormacos-target
), you do not have to specify a path for "GoogleService-Info.plist" file if you wish (i.e.ios-out
ormacos-out
). This is because the CLI will add the "GoogleService-Info.plist" file to the bundle resources, and it will automatically place the file under the target (e.g.Runner/GoogleService-Info.plist
).Examples of commands that completely negate any user input from prompts:
Note, it is required to specify the Firebase project via
--project
argument. You also need to include the--yes
flag which does a few things. It will automatically choose all platforms on your project (e.g. iOS, macOS, android & web), will overwritefirebase_options.dart
(can also use--overwrite-firebase-options
for this specific task), it will also force write necessary updates to androidbuild.gradle
's for FlutterFire configuration.Note, the debug symbols scripts are not being written, nor is
firebase_options.dart
being overwritten. I also removedandroid-out
argument to demonstrate that by default, it will write toandroid/app/google-services.json
as usual.Note, I was using VGV's CLI to create a project for testing as it has different schemes setup from the beginning (i.e. development, staging, production). macOS schemes will be fixed in a future release, so we use the target again here.
To use this dev release:
Related issues
Part of: https://github.com/invertase/flutterfire_cli/issues/14
Type of Change
feat
-- New feature (non-breaking change which adds functionality)fix
-- Bug fix (non-breaking change which fixes an issue)!
-- Breaking change (fix or feature that would cause existing functionality to change)refactor
-- Code refactorci
-- Build configuration changedocs
-- Documentationchore
-- Chore