Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to convert app.config.js for expo #290

Open
ysnbyzli opened this issue Jul 12, 2024 · 0 comments
Open

How to convert app.config.js for expo #290

ysnbyzli opened this issue Jul 12, 2024 · 0 comments

Comments

@ysnbyzli
Copy link

In my current app.config.js file, I define dev and prod configurations based on app environment information. How can I integrate this configuration with withYandexMaps?

module.exports = ({config}) => {
  return {
    ...config,
    name:
      process.env.EXPO_PUBLIC_APP_ENV === 'production'
        ? 'Prod Name'
        : 'Dev Name',
    android: {
      ...config.android,
      package:
        process.env.EXPO_PUBLIC_APP_ENV === 'production'
          ? 'prod.package.name'
          : 'dev.package.name',
      config: {
        googleMaps: {
          apiKey: process.env.EXPO_PUBLIC_GOOGLE_API_KEY,
        },
      },
    },
    ios: {
      ...config.ios,
      bundleIdentifier:
        process.env.EXPO_PUBLIC_APP_ENV === 'production'
          ? 'prod.bundle.identifier'
          : 'dev.bundle.identifier',
      config: {
        googleMapsApiKey: process.env.EXPO_PUBLIC_GOOGLE_API_KEY,
      },
    },
  }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant