-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathapp.config.ts
More file actions
267 lines (238 loc) · 8.54 KB
/
app.config.ts
File metadata and controls
267 lines (238 loc) · 8.54 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
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
// Load environment variables with proper priority (system > .env)
// eslint-disable-next-line @typescript-eslint/no-require-imports
require("./scripts/load-env.js");
// Bundle ID format: space.manus.<project_name_dots>.<timestamp>
// e.g., "my-app" created at 2024-01-15 10:30:45 -> "space.manus.my.app.t20240115103045"
const bundleId = "space.manus.protocol.guide.t20260110193545";
// Extract timestamp from bundle ID and prefix with "manus" for deep link scheme
// e.g., "space.manus.my.app.t20240115103045" -> "manus20240115103045"
const timestamp = bundleId.split(".").pop()?.replace(/^t/, "") ?? "";
const schemeFromBundleId = `manus${timestamp}`;
const env = {
// App branding - update these values directly (do not use env vars)
appName: "Protocol Guide",
appSlug: "protocol-guide",
// App logo - uses local icon from assets/images/icon.png
logoUrl: "",
scheme: schemeFromBundleId,
iosBundleId: bundleId,
androidPackage: bundleId,
};
const config = {
name: env.appName,
slug: env.appSlug,
version: "1.0.0",
orientation: "portrait",
icon: "./assets/images/icon.png",
scheme: env.scheme,
userInterfaceStyle: "light", // Light theme only for field use
newArchEnabled: true,
// EAS Project Configuration
owner: "tannero19", // Expo account username
extra: {
eas: {
projectId: "9ab928c4-ba00-4c6e-affc-0a827b869942"
},
supabaseUrl: process.env.EXPO_PUBLIC_SUPABASE_URL || process.env.SUPABASE_URL,
supabaseAnonKey: process.env.EXPO_PUBLIC_SUPABASE_ANON_KEY || process.env.SUPABASE_ANON_KEY,
},
// Update configuration for OTA updates
updates: {
enabled: true,
url: "https://u.expo.dev/9ab928c4-ba00-4c6e-affc-0a827b869942",
fallbackToCacheTimeout: 30000,
checkAutomatically: "ON_LOAD",
},
// Runtime version for updates compatibility
runtimeVersion: {
policy: "appVersion"
},
ios: {
supportsTablet: true,
bundleIdentifier: env.iosBundleId,
buildNumber: "1",
// iOS Permissions - Required for App Store approval
infoPlist: {
// Microphone for voice search
NSMicrophoneUsageDescription: "Protocol Guide uses the microphone for voice-activated protocol search, allowing hands-free lookup during emergencies.",
// Speech recognition for voice commands
NSSpeechRecognitionUsageDescription: "Protocol Guide uses speech recognition for hands-free protocol lookup, enabling voice commands while your hands are occupied with patient care.",
// Camera (if scanning QR codes or documents)
NSCameraUsageDescription: "Protocol Guide uses the camera to scan QR codes for quick protocol access and to capture images for documentation.",
// Photo library access
NSPhotoLibraryUsageDescription: "Protocol Guide accesses your photos to attach images to patient documentation and reports.",
// Location for regional protocols (optional)
NSLocationWhenInUseUsageDescription: "Protocol Guide uses your location to automatically select regional protocols and provide location-specific emergency procedures.",
// Face ID for secure access (optional)
NSFaceIDUsageDescription: "Protocol Guide uses Face ID for secure, quick access to the app and protected patient information.",
// Background modes for voice guidance and push notifications
UIBackgroundModes: ["audio", "fetch", "remote-notification"],
// App Transport Security - Allow connections to your API
NSAppTransportSecurity: {
NSAllowsArbitraryLoads: false,
NSExceptionDomains: {
"protocol-guide.com": {
NSIncludesSubdomains: true,
NSExceptionAllowsInsecureHTTPLoads: false,
NSExceptionRequiresForwardSecrecy: true,
NSExceptionMinimumTLSVersion: "TLSv1.2"
}
}
},
// iTunes file sharing (for protocol exports)
UIFileSharingEnabled: false,
LSSupportsOpeningDocumentsInPlace: true,
// Privacy manifest requirements (iOS 17+)
NSPrivacyAccessedAPITypes: [
{
NSPrivacyAccessedAPIType: "NSPrivacyAccessedAPICategoryUserDefaults",
NSPrivacyAccessedAPITypeReasons: ["CA92.1"] // App functionality
}
],
// App Store Connect compliance - no non-exempt encryption used
ITSAppUsesNonExemptEncryption: false
},
// Entitlements
entitlements: {
"aps-environment": "production"
},
// Privacy manifest
privacyManifests: {
NSPrivacyAccessedAPITypes: [
{
NSPrivacyAccessedAPIType: "NSPrivacyAccessedAPICategoryUserDefaults",
NSPrivacyAccessedAPITypeReasons: ["CA92.1"]
}
]
}
},
android: {
adaptiveIcon: {
backgroundColor: "#C41E3A",
foregroundImage: "./assets/images/android-icon-foreground.png",
backgroundImage: "./assets/images/android-icon-background.png",
monochromeImage: "./assets/images/android-icon-monochrome.png",
},
edgeToEdgeEnabled: true,
package: env.androidPackage,
versionCode: 1,
// Android Permissions
permissions: [
"android.permission.RECORD_AUDIO", // Voice search
"android.permission.INTERNET", // Network access
"android.permission.ACCESS_NETWORK_STATE", // Network status
"android.permission.CAMERA", // QR scanning, photos
"android.permission.READ_EXTERNAL_STORAGE", // File access
"android.permission.WRITE_EXTERNAL_STORAGE", // Save files
"android.permission.VIBRATE", // Haptic feedback
"android.permission.WAKE_LOCK", // Keep screen on
"android.permission.FOREGROUND_SERVICE", // Background tasks
"android.permission.RECEIVE_BOOT_COMPLETED", // Auto-start
"android.permission.USE_BIOMETRIC", // Biometric auth
"android.permission.ACCESS_FINE_LOCATION", // Location (optional)
"android.permission.ACCESS_COARSE_LOCATION" // Approximate location
],
// Intent filters for deep linking
intentFilters: [
{
action: "VIEW",
autoVerify: true,
data: [
{
scheme: "https",
host: "protocol-guide.com",
pathPrefix: "/protocol"
},
{
scheme: "https",
host: "*.protocol-guide.com",
pathPrefix: "/protocol"
}
],
category: ["BROWSABLE", "DEFAULT"]
}
]
},
web: {
bundler: "metro",
output: "single", // Static export has route discovery issues; using component-level lazy loading instead
favicon: "./public/favicon.ico",
// PWA Configuration
template: "./web/index.html",
manifest: {
name: "Protocol Guide",
short_name: "ProtocolGuide",
description: "EMS Protocol Retrieval - AI-powered protocol search for EMS professionals",
start_url: "/",
display: "standalone",
orientation: "portrait",
theme_color: "#C41E3A",
background_color: "#ffffff",
scope: "/",
icons: [
{
src: "/icon-192.png",
sizes: "192x192",
type: "image/png",
purpose: "any maskable",
},
{
src: "/icon-512.png",
sizes: "512x512",
type: "image/png",
purpose: "any maskable",
},
],
categories: ["medical", "health", "productivity"],
},
},
plugins: [
// Expo Router with async routes for web bundle splitting
[
"expo-router",
{
asyncRoutes: {
web: true,
},
},
],
// Push notifications configuration
[
"expo-notifications",
{
icon: "./assets/images/notification-icon.png",
color: "#2563eb",
sounds: [],
}
],
// Build properties for native configuration
[
"expo-build-properties",
{
ios: {
deploymentTarget: "15.1",
useFrameworks: "static",
// Enable microphone and speech recognition capabilities
newArchEnabled: true,
flipper: false // Disable Flipper for production builds
},
android: {
compileSdkVersion: 34,
targetSdkVersion: 34,
minSdkVersion: 24,
buildToolsVersion: "34.0.0",
kotlinVersion: "1.9.22",
newArchEnabled: true,
// Enable Proguard for release builds
enableProguardInReleaseBuilds: true,
enableShrinkResourcesInReleaseBuilds: true
}
}
],
],
experiments: {
typedRoutes: true,
reactCompiler: false, // Disabled - causes JSX runtime issues with NativeWind
},
};
export default config;