-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Expand file tree
/
Copy pathapp.config.js
More file actions
122 lines (117 loc) · 3.21 KB
/
app.config.js
File metadata and controls
122 lines (117 loc) · 3.21 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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
const { RUNTIME_VERSION, PROJECT_ID, UPDATE_URL } = require('./ota.config.js');
// Use METAMASK_ENVIRONMENT to select OTA certs:
// - "production" and "rc" use their own certificates
// - all other environments (exp, dev, test, e2e, beta, etc.) fall back to "exp"
const OTA_ENV_MAP = {
production: 'production',
rc: 'rc',
};
const OTA_ENV = OTA_ENV_MAP[process.env.METAMASK_ENVIRONMENT] ?? 'exp';
const CODE_SIGNING_CERTS = {
production: './certs/production.certificate.pem',
exp: './certs/exp.certificate.pem',
rc: './certs/rc.certificate.pem',
};
const CODE_SIGNING_KEYIDS = {
production: 'production',
exp: 'exp',
rc: 'rc',
};
module.exports = {
name: 'MetaMask',
displayName: 'MetaMask',
experiments: {
reactCompiler: {
enabled: true,
},
},
plugins: [
[
'expo-build-properties',
{
android: {
extraMavenRepos: [
'../../node_modules/@notifee/react-native/android/libs',
],
},
ios: {
jsEngine: 'hermes',
},
},
],
[
'@config-plugins/detox',
{
subdomains: '*',
},
],
'expo-apple-authentication',
[
'expo-screen-orientation',
{
initialOrientation: 'PORTRAIT',
},
],
[
'expo-font',
{
// NOTE: We use a simple path array for fonts. Each font file becomes a separate
// font family based on its filename (e.g., Geist-Medium.otf → 'Geist-Medium').
// This means the fontWeight property won't automatically switch fonts - you must use
// explicit font families like 'Geist-Medium' or use fontStyles.* from common.ts.
//
// Future: We may migrate to platform-specific configuration to enable native
// fontWeight support. See: https://docs.expo.dev/develop/user-interface/fonts/
fonts: [
'./app/fonts/Geist-Regular.otf',
'./app/fonts/Geist-Medium.otf',
'./app/fonts/Geist-Bold.otf',
'./app/fonts/Geist-RegularItalic.otf',
'./app/fonts/Geist-MediumItalic.otf',
'./app/fonts/Geist-BoldItalic.otf',
'./app/fonts/MMSans-Regular.otf',
'./app/fonts/MMSans-Medium.otf',
'./app/fonts/MMSans-Bold.otf',
'./app/fonts/MMPoly-Regular.otf',
],
},
],
],
android: {
package:
process.env.METAMASK_BUILD_TYPE === 'flask'
? 'io.metamask.flask'
: 'io.metamask', // Required for @expo/repack-app Android repacking
},
ios: {
bundleIdentifier:
process.env.METAMASK_BUILD_TYPE === 'flask'
? 'io.metamask.MetaMask-Flask'
: 'io.metamask.MetaMask', // Required for @expo/repack-app iOS repacking
usesAppleSignIn: true,
jsEngine: 'hermes',
},
expo: {
owner: 'metamask',
runtimeVersion: RUNTIME_VERSION,
updates: {
codeSigningCertificate: CODE_SIGNING_CERTS[OTA_ENV],
codeSigningMetadata: {
keyid: CODE_SIGNING_KEYIDS[OTA_ENV],
alg: 'rsa-v1_5-sha256',
},
url: UPDATE_URL,
},
extra: {
eas: {
projectId: PROJECT_ID,
},
},
android: {
package: 'io.metamask',
},
ios: {
bundleIdentifier: 'io.metamask.MetaMask',
},
},
};