react-native-yamap icon indicating copy to clipboard operation
react-native-yamap copied to clipboard

How to convert app.config.js for expo

Open ysnbyzli opened this issue 1 year ago • 0 comments

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,
      },
    },
  }
}

ysnbyzli avatar Jul 12 '24 12:07 ysnbyzli