ueno-llc / react-native-starter

Professional react-native starter kit with everything you'll ever need to deploy rock solid apps
https://ueno-llc.github.io/react-native-starter
MIT License
573 stars 89 forks source link

What is the best way to deal with google-services.json and GoogleService-Info.plist? #195

Closed zachheine closed 5 years ago

zachheine commented 5 years ago

If these are not being committed to version control, how does Appcenter get access to them?

Salakar commented 5 years ago

https://github.com/ueno-llc/react-native-starter/blob/master/appcenter-pre-build.sh#L19-L25

^-- It's an env variable set on Appcenter

birkir commented 5 years ago

Yes we should add this to the documentation, thanks @Salakar

Basically base64 encode the JSON and store as environment variable.

I don't know how precious this file actually is, but it's always good to keep secrets, secret.

zachheine commented 5 years ago

Thanks, I dug deeper and saw the pre-build script lines but didn't understand the base64 decode piece. (Now I understand I am supposed to encode the JSON/Plist and paste that into Appcenter.) I used this in my script instead: https://www.jimbobbennett.io/updating-your-google-service-json-from-an-appcenter-environment-variable. Where should I submit pull requests to the documentation? I have worked through a couple of other things that were not documented and am happy to help. Thanks for this starter; it's been a pleasure to work with.

jeremybarbet commented 5 years ago

Feel free to open an pull request with all the changes you have in mind, and even if they are not at the best place in the document's navigation we will provide you feedback to move it at the best place.

About the Google Service file, I guess the best spot would be under https://ueno-llc.github.io/react-native-starter/#/SERVICES?id=firebase with maybe a link to this page inside the environment section and publishing/app center section too.

Cheers

birkir commented 5 years ago

@zachheine the solution you provided without base64 encoding is dangerous.

There is way more stuff to escape than just double quotes.

zachheine commented 5 years ago

I think the base64 encoding is more elegant in any case. I have a PR in for updating the docs.