/* * ITMS 모바일 앱 — 동적 설정(app.config.js). * 빌드 프로파일별 base URL 분리: ITMS_ENV=dev|prod (eas.json build..env 로 주입). * dev → https://itms.zioinfo.co.kr (개발서버 리버스 프록시) * prod → https://itms.wise.ai.kr (운영 도메인) * 로컬 개발(expo start)은 ITMS_ENV 미지정 → dev 기본. * 보안: 내부 IP 하드코딩 금지 — 공개 도메인만 사용. * * OAuth2 client 식별자(clientId/secretKey)는 인가서버 인메모리 클라이언트와 동일한 공개 등록값이며, * 필요 시 아래 extra 로 오버라이드(사용자/서버 자격증명·AES 암호문 아님). */ const ITMS_ENV = process.env.ITMS_ENV === 'prod' ? 'prod' : 'dev' const API_URL = ITMS_ENV === 'prod' ? 'https://itms.wise.ai.kr' : 'https://itms.zioinfo.co.kr' module.exports = { expo: { name: 'ITMS', slug: 'itms-app', version: '1.0.0', orientation: 'portrait', icon: './assets/icon.png', scheme: 'itms', userInterfaceStyle: 'automatic', newArchEnabled: false, splash: { image: './assets/splash.png', resizeMode: 'contain', backgroundColor: '#1f29fc', }, ios: { supportsTablet: true, bundleIdentifier: 'kr.zioinfo.itms', }, android: { package: 'kr.zioinfo.itms', versionCode: 1, adaptiveIcon: { foregroundImage: './assets/adaptive-icon.png', backgroundColor: '#1f29fc', }, // 운영/개발 모두 HTTPS 도메인 → 평문 HTTP 비허용. usesCleartextTraffic: false, }, web: { bundler: 'metro', output: 'static', }, plugins: [ 'expo-router', 'expo-secure-store', './plugins/withGradleProps', 'expo-font', [ 'expo-splash-screen', { image: './assets/splash.png', resizeMode: 'contain', backgroundColor: '#1f29fc', }, ], ], extra: { itmsEnv: ITMS_ENV, itmsApiUrl: API_URL, // OAuth2 client 등록 식별자(공개값 — 인가서버와 1:1). 필요 시 EAS env 로 오버라이드. itmsOauthClientId: process.env.ITMS_OAUTH_CLIENT_ID || 'clientId', itmsOauthClientSecret: process.env.ITMS_OAUTH_CLIENT_SECRET || 'secretKey', router: { origin: false }, eas: { projectId: process.env.ITMS_EAS_PROJECT_ID || undefined }, }, owner: 'infraurp', }, }