diff --git a/src/components/AppVersionInfo.tsx b/src/components/AppVersionInfo.tsx index c425a8a..18d3240 100644 --- a/src/components/AppVersionInfo.tsx +++ b/src/components/AppVersionInfo.tsx @@ -35,7 +35,7 @@ const AppVersionInfo: React.FC = ({ try { console.log('앱 버전 정보 요청 시작... (retries:', retries, ')'); console.log('현재 플랫폼은', - isAndroidPlatform() ? 'Android' : isIOSPlatform() ? 'iOS' : '웹'); + isAndroidPlatform() ? 'Android' : isIOSPlatform() ? 'iOS' : '알 수 없음'); // 재시도를 하는 경우 짤은 지연 추가 if (retries > 0) { diff --git a/src/plugins/build-info.ts b/src/plugins/build-info.ts index 6a1400d..4a8931f 100644 --- a/src/plugins/build-info.ts +++ b/src/plugins/build-info.ts @@ -19,21 +19,21 @@ interface BuildInfoPlugin { // 기본 플러그인 구현 const BuildInfo: BuildInfoPlugin = { getBuildInfo: async () => { - console.log('BuildInfo.getBuildInfo() 호출됨 (웹 플러그인)'); + console.log('BuildInfo.getBuildInfo() 호출됨 (기본 구현)'); try { - // 웹 환경에서 앱 버전 정보를 가져오는 로직 + // 네이티브 환경에서 앱 버전 정보를 가져오는 로직 // 실제 네이티브 환경에서는 이 구현이 네이티브 코드로 대체됨 // android/version.properties 또는 ios의 Info.plist에서 // 설정된 값을 반환하는 네이티브 구현이 런타임에 이 함수를 대체함 - // 개발 환경을 위한 기본값 + // 네이티브 구현이 없을 경우를 위한 기본값 return { versionName: '1.0.1', versionCode: 1, - buildNumber: 2, - platform: 'web', + buildNumber: 3, + platform: 'native', isDefault: true }; } catch (error) { @@ -49,6 +49,6 @@ const BuildInfo: BuildInfoPlugin = { } }; -// 필요시 웹과 네이티브 환경에서 다르게 동작하도록 설정 +// 필요시 네이티브 환경에서 다르게 동작하도록 설정 // 실제 네이티브 플러그인은 runtime에 교체됨 export default BuildInfo; diff --git a/src/utils/platform.ts b/src/utils/platform.ts index b80e788..c9a89de 100644 --- a/src/utils/platform.ts +++ b/src/utils/platform.ts @@ -19,13 +19,6 @@ export const isIOSPlatform = (): boolean => { return Capacitor.getPlatform() === 'ios'; }; -/** - * 웹 플랫폼인지 확인 - */ -export const isWebPlatform = (): boolean => { - return Capacitor.getPlatform() === 'web'; -}; - /** * 네이티브 플랫폼(Android 또는 iOS)인지 확인 */ @@ -93,7 +86,7 @@ export const getAppVersionInfo = async () => { }; } - // 플러그인이 없거나 웹 환경이면 기본값 반환 + // 플러그인이 없는 경우 기본값 반환 return { versionName: '1.0.1', buildNumber: 3, // 업데이트된 빌드 번호