export default ({ config }) => ({ // 1) spread in everything from app.json under "expo" ...config, // 2) inject the googleMaps.apiKey from the env android: { // keep all existing android fields (adaptiveIcon, edgeToEdgeEnabled, package, permissions) ...config.android, config: { ...(config.android?.config || {}), googleMaps: { apiKey: process.env.ANDROID_MAPS_API_KEY || 'AIzaSyB1WZHDqjGk696AmVw7tA2sMAuOurt552Q' // When running dev mode or starting apk build locally, this will need to be replaced with the actual API key } // You can get this from CI/CD variables }, // Permissions (unchanged) permissions: config.android?.permissions || [ 'ACCESS_FINE_LOCATION', 'ACCESS_COARSE_LOCATION' ] }, ios: { // keep everything in iOS as-is, but inject googleMapsApiKey ...config.ios, config: { ...(config.ios?.config || {}), googleMapsApiKey: process.env.IOS_MAPS_API_KEY || '' } }, });