-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathapp.config.js
More file actions
56 lines (52 loc) · 1.83 KB
/
app.config.js
File metadata and controls
56 lines (52 loc) · 1.83 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
// This file extends app.json with dynamic configuration.
// EAS will auto-increment buildNumber/versionCode in app.json,
// while this file handles dynamic values like bundle identifiers.
module.exports = ({ config }) => {
const buildProfile =
process.env.EAS_BUILD_PROFILE ||
process.env.APP_VARIANT ||
process.env.EXPO_PUBLIC_ENV ||
'production';
const isDevelopment = buildProfile === 'development' || buildProfile === 'preview';
// Debug logging to verify bundle identifier selection
if (process.env.EAS_BUILD_PROFILE || process.env.APP_VARIANT) {
console.log(`[app.config.js] Build profile: ${buildProfile}, isDevelopment: ${isDevelopment}`);
console.log(
`[app.config.js] Bundle identifier will be: ${isDevelopment ? 'com.sovranbitcoin.dev' : 'com.sovranbitcoin'}`
);
}
const appIcon = './assets/images/light.png';
const adaptiveIcon = './assets/images/light-t.png';
const androidGoogleMapsApiKey =
process.env.EXPO_PUBLIC_GOOGLE_MAPS_API_KEY || process.env.GOOGLE_MAPS_API_KEY;
// Spread the static config from app.json and override only what's needed
return {
...config,
icon: appIcon,
plugins: [
...(config.plugins || []),
'expo-maps',
'expo-liquid-glass-native',
'./plugins/withLiquidGlassMainApplication',
],
ios: {
...config.ios,
bundleIdentifier: isDevelopment ? 'com.sovranbitcoin.dev' : 'com.sovranbitcoin',
},
android: {
...config.android,
config: {
...config.android?.config,
googleMaps: {
...config.android?.config?.googleMaps,
apiKey: androidGoogleMapsApiKey,
},
},
adaptiveIcon: {
...config.android?.adaptiveIcon,
foregroundImage: adaptiveIcon,
},
package: isDevelopment ? 'com.sovranbitcoin.dev' : 'com.sovranbitcoin',
},
};
};