EddyVerbruggen/nativescript-plugin-firebase
Vedi su GitHubFeature Request: Add/Override additional environments for Google services files
Open
#1515 aperta il 9 dic 2019
enhancementhelp wanted
Metriche repository
- Star
- (1005 star)
- Metriche merge PR
- (Nessuna PR mergiata in 30 g)
Descrizione
Hi Eddy, I think it'd be handy to have a way to add additional Firebase environments, or override the defaults. Currently the plugin supports development and production environments, but other ones like staging or pre-production would be good too. I don't know if it's possible but a good place to control these might be in the firebase.nativescript.json file as an array of the the specified environments. These would correspond to the suffixes on the google-services.json and GoogleServices-Info.plist files.
Example
prodwill be selected if you run with either the--release,--env.prodor--env.productionflagsstagingwill be selected if you run with--env.staging(the environment string must match what is in the configuration array, filename and command-line arguments). If you combine--releasewith--env.staging. thenstagingwould be selected and the app would be built as a release version.devwill be selected if you do not run with any of the above flags
// in firebase.nativescript.json file
{
...
"firebase_environments": [ "dev", "staging", "prod" ]
...
}
// above would map to:
// Android
// google-services.json.dev
// google-services.json.staging
// google-services.json.prod
// iOS
// GoogleServices-Info.plist.dev
// GoogleServices-Info.plist.staging
// GoogleServices-Info.plist.prod