react-native-yamap
react-native-yamap copied to clipboard
How to convert app.config.js for expo
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,
},
},
}
}