Files
goldenChart/app/README.md
T
2026-05-28 16:24:14 +09:00

57 lines
1.8 KiB
Markdown

# GoldenChart Mobile App
Capacitor + React hybrid app for virtual trading, strategy editor, notifications, and settings.
## Setup
```bash
# From repo root
npm install
npm run dev:app
```
## Native build
```bash
npm run build:app
npm run cap:sync
npm run cap:android # or cap:ios
```
## exdev.co.kr APK 배포
소스는 `git push origin main` (Jenkins). APK만 로컬 빌드 후 업로드:
```bash
./scripts/upload-android-apk.sh --build --version 1.0.0
```
`app/.env` 예: `VITE_API_BASE_URL=http://exdev.co.kr/api`
자세한 내용: [`data/mobile-releases/README.md`](../data/mobile-releases/README.md)
## Environment
Copy `.env.example` to `.env` and set `VITE_API_BASE_URL`.
### 로그인 시 "Failed to fetch"
- APK는 빌드 시 `.env``VITE_API_BASE_URL`이 번들에 박힙니다 (기본: `http://exdev.co.kr/api`).
- `capacitor.config.ts``androidScheme`**`http`** 여야 합니다. `https`이면 WebView가 `https://localhost`에서 뜨고 HTTP API 호출이 차단됩니다.
- 설정에 `localhost` API가 저장돼 있으면 앱 시작 시 자동으로 제거합니다.
## FCM (Firebase)
- Android: `app/android/app/google-services.json` — [FCM_SETUP.md](android/FCM_SETUP.md) 참고
goldenApp(`goldenanalysisapp`)과 동일 프로젝트, 패키지 `com.goldenchart.app` 등록 필요
- 설정: `./scripts/setup-android-fcm.sh [다운로드한 json 경로]`
- iOS: `ios/App/GoogleService-Info.plist` + Push Notifications capability
- Backend: `FIREBASE_ENABLED=true` + `firebase-service-account.json`
- 앱: 로그인 후 설정에서 **FCM 푸시** ON + 알림 권한 허용
## Structure
- `src/screens/` — mobile UI (virtual, strategy, notifications, settings)
- `../packages/shared/` — API client + Capacitor storage
- `../frontend/src/` — shared business logic (hooks, utils) via `@frontend` alias