fix: Android APK 다운로드 window.open, CI npm ci 보강

@capacitor/browser 제거하고 네이티브 WebView에서 window.open 사용.
app node_modules 누락 시 root npm ci 실행.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Macbook
2026-06-14 17:11:16 +09:00
parent 53266ccc64
commit 7dab067aed
4 changed files with 3 additions and 19 deletions
-1
View File
@@ -14,7 +14,6 @@
"dependencies": { "dependencies": {
"@capacitor/android": "^7.0.0", "@capacitor/android": "^7.0.0",
"@capacitor/app": "^7.0.0", "@capacitor/app": "^7.0.0",
"@capacitor/browser": "^7.0.5",
"@capacitor/core": "^7.0.0", "@capacitor/core": "^7.0.0",
"@capacitor/haptics": "^7.0.0", "@capacitor/haptics": "^7.0.0",
"@capacitor/ios": "^7.0.0", "@capacitor/ios": "^7.0.0",
+2 -7
View File
@@ -2,7 +2,6 @@
* Android 앱 내 업데이트 — /api/mobile-app/info 버전 비교 후 APK 다운로드 * Android 앱 내 업데이트 — /api/mobile-app/info 버전 비교 후 APK 다운로드
*/ */
import { App } from '@capacitor/app'; import { App } from '@capacitor/app';
import { Browser } from '@capacitor/browser';
import { Capacitor } from '@capacitor/core'; import { Capacitor } from '@capacitor/core';
import { import {
isRemoteVersionNewer, isRemoteVersionNewer,
@@ -50,12 +49,8 @@ export async function openApkDownload(release?: MobileAppReleaseInfoDto | null):
if (!url) return false; if (!url) return false;
if (Capacitor.isNativePlatform() && Capacitor.getPlatform() === 'android') { if (Capacitor.isNativePlatform() && Capacitor.getPlatform() === 'android') {
try { const opened = window.open(url, '_blank', 'noopener,noreferrer');
await Browser.open({ url }); if (opened) return true;
return true;
} catch {
/* fallback */
}
} }
const a = document.createElement('a'); const a = document.createElement('a');
-10
View File
@@ -18,7 +18,6 @@
"dependencies": { "dependencies": {
"@capacitor/android": "^7.0.0", "@capacitor/android": "^7.0.0",
"@capacitor/app": "^7.0.0", "@capacitor/app": "^7.0.0",
"@capacitor/browser": "^7.0.5",
"@capacitor/core": "^7.0.0", "@capacitor/core": "^7.0.0",
"@capacitor/haptics": "^7.0.0", "@capacitor/haptics": "^7.0.0",
"@capacitor/ios": "^7.0.0", "@capacitor/ios": "^7.0.0",
@@ -422,15 +421,6 @@
"@capacitor/core": ">=7.0.0" "@capacitor/core": ">=7.0.0"
} }
}, },
"node_modules/@capacitor/browser": {
"version": "7.0.5",
"resolved": "https://registry.npmjs.org/@capacitor/browser/-/browser-7.0.5.tgz",
"integrity": "sha512-YF/kC1m1e6c81X/agtAnYItVlqiQ/nXLG+Q3QXNDuiMoRynqa3Guu8ZaV9kWvqQcHoE2w18xz7WGpPOuh+R1fA==",
"license": "MIT",
"peerDependencies": {
"@capacitor/core": ">=7.0.0"
}
},
"node_modules/@capacitor/cli": { "node_modules/@capacitor/cli": {
"version": "7.6.5", "version": "7.6.5",
"resolved": "https://registry.npmjs.org/@capacitor/cli/-/cli-7.6.5.tgz", "resolved": "https://registry.npmjs.org/@capacitor/cli/-/cli-7.6.5.tgz",
+1 -1
View File
@@ -64,7 +64,7 @@ fi
log "google-services.json 확인" log "google-services.json 확인"
"$ROOT/scripts/ensure-android-google-services.sh" "$ROOT/scripts/ensure-android-google-services.sh"
if [[ ! -d "$ROOT/node_modules/vite" ]]; then if [[ ! -d "$ROOT/node_modules/vite" ]] || [[ ! -d "$ROOT/app/node_modules/@capacitor/core" ]]; then
log "npm ci (root dependencies)" log "npm ci (root dependencies)"
(cd "$ROOT" && npm ci) (cd "$ROOT" && npm ci)
fi fi