-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy pathapp.config.ts
More file actions
217 lines (213 loc) · 7.71 KB
/
Copy pathapp.config.ts
File metadata and controls
217 lines (213 loc) · 7.71 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
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
import type { ExpoConfig } from 'expo/config';
import { ENV_KEYS, OPTIONAL_ENV_KEYS } from './src/lib/env-keys';
import { UNIVERSAL_LINK_PATH_PATTERNS } from './src/lib/universal-link-paths';
const missing = Object.values(ENV_KEYS).filter(key => !process.env[key]);
if (missing.length > 0) {
const message = `Missing required environment variables: ${missing.join(', ')}`;
if (process.env.GITHUB_ACTIONS) {
console.warn(`⚠️ ${message}`);
} else {
throw new Error(message);
}
}
// Google OAuth client IDs are public identifiers (committed .env, all EAS
// environments). The conditional below tolerates their absence so the app still builds when a
// checkout lacks them; the native Google button hides itself when undefined.
const googleIosClientId = process.env[OPTIONAL_ENV_KEYS.googleIosClientId];
const googleIosUrlScheme = googleIosClientId
? `com.googleusercontent.apps.${googleIosClientId.replace(/\.apps\.googleusercontent\.com$/, '')}`
: undefined;
const googleSignInPlugins: NonNullable<ExpoConfig['plugins']> = googleIosUrlScheme
? [['@react-native-google-signin/google-signin', { iosUrlScheme: googleIosUrlScheme }]]
: [];
const config: ExpoConfig = {
name: 'Kilo',
owner: 'kilocode',
slug: 'kilo-app',
version: '1.0.4',
// Portrait-only is an accepted, documented product deviation from WCAG 1.3.4
// (Orientation). Landscape layouts and iPad split-view/multitasking are out
// of scope; `ios.requireFullScreen` below enforces that. This is not claimed
// as a WCAG "essential" exception, which requires functionality to
// fundamentally change with orientation.
orientation: 'portrait',
icon: './assets/images/logo.png',
scheme: 'kiloapp',
userInterfaceStyle: 'automatic',
ios: {
// iOS 18+ appearance variants. `light` is the existing icon unchanged; `dark` keeps the
// canonical mobile brand yellow on a dark backdrop; `tinted` is grayscale because iOS
// applies its own tint. All three are opaque 1024x1024 — Expo requires the icon to fill
// the square with no transparent pixels.
icon: {
light: './assets/images/logo.png',
dark: './assets/images/logo-dark.png',
tinted: './assets/images/logo-tinted.png',
},
bundleIdentifier: 'com.kilocode.kiloapp',
requireFullScreen: true,
supportsTablet: true,
usesAppleSignIn: true,
associatedDomains: ['applinks:app.kilo.ai'],
infoPlist: {
ITSAppUsesNonExemptEncryption: false,
NSAdvertisingAttributionReportEndpoint: 'https://appsflyer-skadnetwork.com/',
// Apple's raw key for AdAttributionKit postback copies is the top-level
// string `AttributionCopyEndpoint` (Xcode displays it as "AdAttributionKit -
// Postback Copy URL"). A nested AdAttributionKit dictionary is silently
// ignored by iOS, so copies never reached AppsFlyer.
AttributionCopyEndpoint: 'https://appsflyer-skadnetwork.com/',
// Make the app's Documents directory user-visible in the iOS Files
// app so downloaded any-file attachments (uploaded via the cloud-agent
// composer) can be opened in place.
UIFileSharingEnabled: true,
LSSupportsOpeningDocumentsInPlace: true,
},
},
android: {
googleServicesFile: './google-services.json',
package: 'com.kilocode.kiloapp',
adaptiveIcon: {
backgroundColor: '#FAF74F',
foregroundImage: './assets/images/android-icon-foreground.png',
backgroundImage: './assets/images/android-icon-background.png',
monochromeImage: './assets/images/android-icon-foreground.png',
},
predictiveBackGestureEnabled: false,
blockedPermissions: [
'android.permission.READ_MEDIA_IMAGES',
'android.permission.READ_MEDIA_VIDEO',
'android.permission.READ_MEDIA_AUDIO',
],
intentFilters: [
{
action: 'VIEW',
autoVerify: true,
data: UNIVERSAL_LINK_PATH_PATTERNS.map(pathPattern => ({
scheme: 'https',
host: 'app.kilo.ai',
pathPattern,
})),
category: ['BROWSABLE', 'DEFAULT'],
},
],
},
plugins: [
['expo-dev-client', { toolsButton: false }],
[
'expo-build-properties',
{
android: {
enableMinifyInReleaseBuilds: true,
usePrecompiledHeaders: true,
},
ios: {
ccacheEnabled: true,
// GoogleSignIn is a Swift static lib that imports GoogleUtilities/RecaptchaInterop
// (pulled transitively alongside expo-iap's AppCheckCore); those pods don't define
// modules, so pod install fails unless we force module maps on them. Unconditional
// because the google-signin pod autolinks whether or not the OAuth client is set.
extraPods: [
{ name: 'GoogleUtilities', modular_headers: true },
{ name: 'RecaptchaInterop', modular_headers: true },
],
},
},
],
[
'expo-speech-recognition',
{
microphonePermission: 'Allow Kilo to use your microphone to turn speech into text.',
speechRecognitionPermission:
'Allow Kilo to use speech recognition to turn your voice into text.',
},
],
'expo-router',
'expo-image',
'expo-font',
'expo-secure-store',
'expo-sharing',
[
'expo-notifications',
{
icon: './assets/images/android-notification-icon.png',
color: '#FAF74F',
},
],
'expo-web-browser',
[
'@sentry/react-native/expo',
{
url: 'https://sentry.io/',
project: 'kilo-app',
organization: 'kilo-code',
},
],
[
'expo-splash-screen',
{
image: './assets/images/logo.png',
backgroundColor: '#FAF74F',
imageWidth: 100,
},
],
[
'expo-location',
{
locationWhenInUsePermission:
'Allow $(PRODUCT_NAME) to use your location to set up local weather.',
isIosBackgroundLocationEnabled: false,
isAndroidBackgroundLocationEnabled: false,
isAndroidForegroundServiceEnabled: false,
},
],
'expo-apple-authentication',
'expo-iap',
[
'expo-tracking-transparency',
{
userTrackingPermission:
'This identifier is used to measure the effectiveness of advertising campaigns.',
},
],
['react-native-appsflyer', { shouldUsePurchaseConnector: true }],
// Local wrapper: pnpm isolation + Kilo target-name collision (see plugin).
[
'./plugins/withExpoShareIntent',
{
iosActivationRules: {
NSExtensionActivationSupportsText: true,
NSExtensionActivationSupportsWebURLWithMaxCount: 1,
NSExtensionActivationSupportsWebPageWithMaxCount: 1,
NSExtensionActivationSupportsImageWithMaxCount: 5,
NSExtensionActivationSupportsFileWithMaxCount: 5,
},
androidIntentFilters: ['text/*', '*/*'],
androidMultiIntentFilters: ['*/*'],
iosAppGroupIdentifier: 'group.com.kilocode.kiloapp',
// Display name "Kilo" is applied by the wrapper; target is ShareExtension
// because iosShareExtensionName "Kilo" collides with the main app target.
iosShareExtensionName: 'Kilo',
},
],
'./plugins/withAndroidManifestFix',
// Registered only when GOOGLE_IOS_CLIENT_ID is set — a guard for checkouts
// whose environment does not provide it.
...googleSignInPlugins,
],
experiments: {
typedRoutes: true,
reactCompiler: true,
},
extra: {
...Object.fromEntries(Object.entries(ENV_KEYS).map(([key, env]) => [key, process.env[env]])),
...Object.fromEntries(
Object.entries(OPTIONAL_ENV_KEYS).map(([key, env]) => [key, process.env[env]])
),
router: {},
eas: {
projectId: '2cf05e39-90b5-48a5-a8a5-e0b3423cf3f4',
},
},
};
export default config;