chore(android): TWA 빌드 설정(twa-manifest) + 가이드 — 알림 위임 ON
Deploy momo-erp / deploy (push) Successful in 1m55s

스토어 업로드는 AAB. 기존 패키지(com.momotogether.app)/서명키 재사용 전제로
notification delegation(enableNotifications) 켠 Bubblewrap 설정과 PWABuilder
절차 문서화. keystore/빌드 산출물은 .gitignore 처리.
This commit is contained in:
chpark
2026-05-27 12:35:58 +09:00
parent 92297145a8
commit c5ff736cc9
3 changed files with 85 additions and 0 deletions
+8
View File
@@ -49,3 +49,11 @@ yarn-error.log*
next-env.d.ts next-env.d.ts
/src/generated/prisma /src/generated/prisma
# Android TWA build artifacts / keystore (절대 커밋 금지)
android/*.keystore
android/*.jks
android/*.aab
android/*.apk
android/app/
android/.gradle/
+37
View File
@@ -0,0 +1,37 @@
# 모모유통 ERP — Android(TWA) 빌드
웹앱(momotogether.com)을 감싸는 **TWA(Trusted Web Activity)** 패키지 빌드 설정입니다.
패키지명 `com.momotogether.app``public/.well-known/assetlinks.json` 의 지문과 짝을 이룹니다.
## 스토어 업로드 형식
- **Google Play 스토어 → AAB** (필수)
- 직접 배포(사이드로드) → APK
## ⚠️ 서명키(중요)
반드시 **기존에 쓰던 keystore 그대로** 사용해야 합니다.
다른 키로 서명하면 `assetlinks.json` 지문이 안 맞아 주소창이 다시 뜨고 **알림 위임(푸시)** 이 깨집니다.
- 기존 지문: `2A:55:B2:9E:03:51:2B:DE:28:E2:A4:34:15:9C:23:1F:21:B6:C0:43:9C:10:3B:6C:E2:D5:46:F7:AF:42:C3:97`
- Play App Signing 을 쓰는 경우, Play Console 의 **앱 서명 인증서 SHA-256** 도 assetlinks 에 포함되어야 합니다.
## 방법 A — PWABuilder (권장, 로컬 툴 불필요)
1. https://www.pwabuilder.com 에서 `https://momotogether.com` 입력
2. **Package For Stores → Android Package**
3. 옵션에서 **Notification delegation(알림 위임) 켜기** ✅ (이게 켜져야 "삼성 인터넷" 대신 앱 이름으로 알림이 옵니다)
4. **기존 서명키 업로드**(처음 만들 때 받은 keystore) — 새로 만들지 말 것
5. **versionCode 를 현재 게시 버전보다 +1**
6. 생성된 **.aab** 를 Play Console 에 새 버전으로 업로드
## 방법 B — Bubblewrap CLI (이 폴더의 twa-manifest.json 사용)
JDK 17 + Android SDK 필요.
```bash
npm i -g @bubblewrap/cli
cd android
# 기존 keystore 를 ./android.keystore 로 복사 (signingKey.path 와 일치)
bubblewrap build # app-release-bundle.aab(스토어용) + app-release-signed.apk(사이드로드용) 생성
```
- `twa-manifest.json``enableNotifications: true` 가 알림 위임 활성화 키입니다.
- 새 버전 낼 때마다 `appVersionCode` 를 올리세요.
## 설치 후 (사용자)
홈화면 설치 → 첫 실행 시 **알림 권한 허용** → 출고요청 화면의 **알림 스위치 ON**.
그러면 새 품목 등록 시 "모모유통" 이름·아이콘으로 푸시가 옵니다.
+40
View File
@@ -0,0 +1,40 @@
{
"packageId": "com.momotogether.app",
"host": "momotogether.com",
"name": "모모유통 ERP",
"launcherName": "모모ERP",
"display": "standalone",
"themeColor": "#1f2937",
"themeColorDark": "#1f2937",
"navigationColor": "#1f2937",
"navigationColorDark": "#1f2937",
"navigationDividerColor": "#1f2937",
"navigationDividerColorDark": "#1f2937",
"backgroundColor": "#ffffff",
"enableNotifications": true,
"startUrl": "/m/login",
"iconUrl": "https://momotogether.com/icon-512.png",
"maskableIconUrl": "https://momotogether.com/icon-512.png",
"monochromeIconUrl": "https://momotogether.com/badge-96.png",
"shortcuts": [],
"generatorApp": "bubblewrap-cli",
"webManifestUrl": "https://momotogether.com/manifest.json",
"fallbackType": "customtabs",
"features": {},
"alphaDependencies": { "enabled": false },
"enableSiteSettingsShortcut": true,
"isChromeOSOnly": false,
"isMetaQuest": false,
"fullScopeUrl": "https://momotogether.com/",
"minSdkVersion": 21,
"orientation": "portrait",
"fingerprints": [],
"additionalTrustedOrigins": [],
"retainedBundles": [],
"appVersion": "1.0.1",
"appVersionCode": 2,
"signingKey": {
"path": "./android.keystore",
"alias": "android"
}
}