Skip to content

Commit

Permalink
Rename the api key property
Browse files Browse the repository at this point in the history
  • Loading branch information
balloman committed Mar 16, 2024
1 parent 69e03d4 commit 48cc634
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

A module to allow the use of the Google Maps SDK as well. Expo Native module for improved performance over react-native-maps

# Setup
On android, use the plugin
On iOS, call the setApiKey function

# Feature Roadmap

- [x] Map Placement
Expand Down
2 changes: 1 addition & 1 deletion example/app.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ export default ({ config }: ConfigContext): ExpoConfig => ({
[
"../app.plugin.js",
{
apiKey: process.env.API_KEY,
androidApiKey: process.env.API_KEY,
},
],
],
Expand Down
6 changes: 3 additions & 3 deletions plugin/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ import {
withAndroidManifest,
} from "@expo/config-plugins";

const withAndroidApiKey: ConfigPlugin<{ apiKey: string }> = (
const withAndroidApiKey: ConfigPlugin<{ androidApiKey: string }> = (
config,
{ apiKey },
{ androidApiKey },
) => {
config = withAndroidManifest(config, config => {
const mainApplication = AndroidConfig.Manifest.getMainApplicationOrThrow(
Expand All @@ -16,7 +16,7 @@ const withAndroidApiKey: ConfigPlugin<{ apiKey: string }> = (
AndroidConfig.Manifest.addMetaDataItemToMainApplication(
mainApplication,
"com.google.android.geo.API_KEY",
apiKey,
androidApiKey,
);

return config;
Expand Down

0 comments on commit 48cc634

Please sign in to comment.