This PR creates our own config plugin, which makes it easy to configure the app using Expo Maps for people who don't know how the library works under the hood. After these changes, you just need to have the right API key in the JSON config file at the root of the example app and run the expo prebuild command to activate the plugin. To run the demo app you no longer need to have our git crypt key or change anything manually in AndroidManifest or Info.plist files.
Starting from now, it will be necessary to run cd example && cp google-maps-api-keys.json.example google-maps-api-keys.json && expo prebuild --clean command to have our demo app configured properly (but it's the only additional command required and it needs to be run just ones).
If you want to change the Google Maps API key which is used by our library in the app, please change the googleMapsApiKey value in the google-maps-api-keys.json file and run expo prebuild --clean again.
It's also worth noticing, that our free key doesn't support querying for POIs.
How
I created a config plugin for the Expo Maps project and added a sample Google Maps API keys config file containing our free key as default data, which is the data source for the plugin. I also ignored Info.plist and AndroidManifest.xml files in git to prevent accidentally leaking the non-free key in their bodies.
Test plan
Android and iOS
Run cd example && cp google-maps-api-keys.json.example google-maps-api-keys.json && expo prebuild --clean and go through the example app
Why
This PR creates our own config plugin, which makes it easy to configure the app using Expo Maps for people who don't know how the library works under the hood. After these changes, you just need to have the right API key in the JSON config file at the root of the example app and run the
expo prebuild
command to activate the plugin. To run the demo app you no longer need to have ourgit crypt
key or change anything manually inAndroidManifest
orInfo.plist
files.Starting from now, it will be necessary to run
cd example && cp google-maps-api-keys.json.example google-maps-api-keys.json && expo prebuild --clean
command to have our demo app configured properly (but it's the only additional command required and it needs to be run just ones).If you want to change the Google Maps API key which is used by our library in the app, please change the
googleMapsApiKey
value in thegoogle-maps-api-keys.json
file and runexpo prebuild --clean
again.It's also worth noticing, that our free key doesn't support querying for POIs.
How
I created a config plugin for the Expo Maps project and added a sample Google Maps API keys config file containing our free key as default data, which is the data source for the plugin. I also ignored
Info.plist
andAndroidManifest.xml
files in git to prevent accidentally leaking the non-free key in their bodies.Test plan
Android and iOS
Run
cd example && cp google-maps-api-keys.json.example google-maps-api-keys.json && expo prebuild --clean
and go through the example app