-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathapp.config.js
More file actions
162 lines (154 loc) · 4.27 KB
/
app.config.js
File metadata and controls
162 lines (154 loc) · 4.27 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
require("dotenv").config();
console.log(
"GOOGLE_SERVICES_JSON env:",
process.env.GOOGLE_SERVICES_JSON ? "EXISTS" : "NOT FOUND"
);
console.log("Current working directory:", process.cwd());
console.log("EXPO_PUBLIC_API_URL from env:", process.env.EXPO_PUBLIC_API_URL);
const API_URL ="https://praytogether.site/api";
// const API_URL ="http://172.30.1.24:8080/api";
// const API_URL ="https://138d6dd62393.ngrok-free.app/api";
// 환경별 설정 ㅇ
const environment = process.env.EAS_BUILD_PROFILE || 'production';
const config = {
production: {
name: '기도함께',
androidPackage: 'site.praytogether',
},
development: {
name: '기도함께Dev',
androidPackage: 'site.praytogether.dev',
},
preview: {
name: '기도함께Preview',
androidPackage: 'site.praytogether.preview',
}
};
const currentConfig = config[environment] || config.production;
const expoVersion = '1.0.17';
const androidVersion = 29;
const iosVersion = '1.0.29';
module.exports = {
name: currentConfig.name,
slug: "app-client",
version: expoVersion,
orientation: "portrait",
icon: "./assets/main_logo.png",
userInterfaceStyle: "light",
newArchEnabled: false,
experiments: {
typedRoutes: true,
tsconfigPaths: true,
newArch: false,
},
updates: {
enabled: true,
checkAutomatically: "ON_LOAD",
fallbackToCacheTimeout: 30000,
url: "https://u.expo.dev/193687a6-0b20-445e-8ecd-5b35de386246"
},
runtimeVersion: expoVersion,
scheme: "pray-together-scheme",
splash: {
image: "./assets/main_logo.png",
resizeMode: "contain",
backgroundColor: "#ffffff",
},
ios: {
supportsTablet: true,
bundleIdentifier: "site.praytogether",
googleServicesFile:
process.env.GOOGLE_SERVICES_FILE_IOS || "./GoogleService-Info.plist",
infoPlist: {
UIBackgroundModes: ["remote-notification"],
NSUserNotificationUsageDescription:
"앱에서 중요한 알림을 보내기 위해 알림 권한이 필요합니다.",
NSAppTransportSecurity: {
// NSAllowsArbitraryLoads: true, // http 요청 허용
},
ITSAppUsesNonExemptEncryption: false,
CFBundleURLTypes: [
{
CFBundleURLSchemes: [
"com.googleusercontent.apps.124350525745-4gap8sbgh7kg5gg7n0cgibd3pb10s7jg",
],
},
],
},
entitlements: {
"aps-environment": "production", // 운영 환경에서 푸시 알림 사용
"com.apple.developer.applesignin": ["Default"], // Sign in with Apple
},
buildNumber: iosVersion,
},
android: {
adaptiveIcon: {
foregroundImage: "./assets/main_logo.png",
backgroundColor: "#ffffff",
},
softwareKeyboardLayoutMode: "pan",
package: currentConfig.androidPackage,
googleServicesFile:
process.env.GOOGLE_SERVICES_JSON || "./google-services.json",
permissions: [
"RECEIVE_BOOT_COMPLETED",
"VIBRATE",
"SCHEDULE_EXACT_ALARM",
"USE_EXACT_ALARM",
"POST_NOTIFICATIONS"
],
blockedPermissions: [
"com.google.android.gms.permission.AD_ID"
],
versionCode: androidVersion,
},
web: {
favicon: "./assets/main_logo.png",
},
plugins: [
"expo-router",
"expo-font",
[
"expo-build-properties",
{
android: {
minSdkVersion: 24, // Android 5.0 이상 (더 넓은 범위)
targetSdkVersion: 35,
compileSdkVersion: 35,
enableProguardInReleaseBuilds: true,
enableShrinkResourcesInReleaseBuilds: true,
// usesCleartextTraffic: true, // http 요청 허용
},
ios: {
useFrameworks: "static",
},
},
],
"@react-native-firebase/app",
"@react-native-firebase/messaging",
[
"@react-native-firebase/crashlytics",
{
enabled: true,
}
],
"expo-notifications",
"expo-dev-client",
"@react-native-google-signin/google-signin",
"expo-apple-authentication",
"./plugins/withAndroidMainActivityPatch.js", // MainActivity lifecycle 패치
"./plugins/withProguardRules.js", // ProGuard 규칙 자동 추가
],
extra: {
router: {
origin: false,
},
eas: {
projectId: "193687a6-0b20-445e-8ecd-5b35de386246",
},
},
// SDK 53
runtimeEnvs: {
EXPO_PUBLIC_API_URL: API_URL,
},
};