EddyVerbruggen/nativescript-plugin-firebase
GitHub で見るFeature Request: Add/Override additional environments for Google services files
Open
#1,515 opened on 2019年12月9日
enhancementhelp wanted
Repository metrics
- Stars
- (1,005 stars)
- PR merge metrics
- (30d に merged PR はありません)
説明
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