Expose secret google maps api key in app.json

Please provide the following:

  1. SDK Version: 49.0.10
  2. Platforms(Android/iOS/web/all): Android
  3. Add the appropriate “Tag” based on what Expo library you have a question on.

I am building a new app which uses google maps ,
But, deploying a map with Google Maps requires to explecitly add maps api key in app.json :
“android”: {
“package”: “com.myapp.app”,
“googleServicesFile”: “./google-services.json”,
“adaptiveIcon”: {
“foregroundImage”: “./assets/adaptive-icon.png”,
“backgroundColor”: “#ffffff
},
“config”: {
** “googleMaps”: {**
** “apiKey”: “…sensitive & secret value…”**
** }**
** }**
},
In general, I store all my secret variables in Expo website as described in Environment variables and secrets in EAS Build - Expo Documentation
now i am feeling confused, on the hand, I can’t expose my secret variables in app.json, but, on the other hand it is madatory to expose it in app.json to support MapView Library.

Any recommendation and idea how to proceed?

Thank you

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.