Getting Started
설치 단계와 이 플러그인의 전체 마크다운 가이드를 포함한 설정 지시를 복사합니다.
Set up this Capacitor plugin in the project.
Use the package manager already used by the project.
Install these package(s): `@capgo/capacitor-webview-version-checker`
Run the required Capacitor sync/update step after installation.
Read this markdown guide for the full setup steps: https://raw.githubusercontent.com/Cap-go/website/refs/heads/main/apps/docs/src/content/docs/docs/plugins/webview-version-checker/getting-started.mdx
Use that guide for platform-specific steps, native file edits, permissions, config changes, imports, and usage setup.
If that guide references other docs pages, read them too.
설치
설치 제목AI-Assisted Setup을 사용하여 플러그인을 설치할 수 있습니다. AI 도구에 Capgo 스킬을 추가하려면 다음 명령어를 사용하세요:
npx skills add https://github.com/Cap-go/capgo-skills --skill capacitor-plugins다음 명령어를 사용하여 다음 프롬프트를 사용하세요:
Use the `capacitor-plugins` skill from `Cap-go/capgo-skills` to install the `@capgo/capacitor-webview-version-checker` plugin in my project.Manual Setup을 선호하는 경우, 플러그인을 설치하기 위해 다음 명령어를 실행하고 아래에 플랫폼별 지침을 따르세요:
-
패키지를 설치하세요
터미널 창 bun add @capgo/capacitor-webview-version-checker -
원시 프로젝트 동기화
터미널 창 bunx cap sync -
선택 사항: 플러그인 구성 추가 기본값으로 실행하거나 (
WebviewVersionChecker: {}) 또는 임의의 프롬프트 및.threshold 동작을 커스터마이즈할 수 있습니다.capacitor.config.ts.
기본 동작 (주요 사용 사례)
기본 동작 (주요 사용 사례) 섹션이 플러그인은 기본적으로 브라우저리스트 스타일의 호환성 규칙을 사용합니다.
minimumDeviceSharePercent기본값으로3- 공유 데이터 세트는 빌드 시 caniuse 데이터에서 패키징됩니다. (기본값으로 )
- __CAPGO_KEEP_0__ URL이 필요하지 않습니다. 기본 흐름에 대해
import type { CapacitorConfig } from '@capacitor/cli';
const config: CapacitorConfig = { plugins: { WebviewVersionChecker: {}, },};
export default config;기본 설정만으로 간단한 구성 (자연어 프롬프트 표시)
기본 설정만으로 간단한 구성 (자연어 프롬프트 표시) - 기본 설정만으로 간단한 구성 (자연어 프롬프트 표시)import type { CapacitorConfig } from '@capacitor/cli';
const config: CapacitorConfig = { plugins: { WebviewVersionChecker: { autoPromptOnOutdated: true, }, },};
export default config;고급 임계값 모드 (사용자 지정 데이터 집합)
고급 임계값 모드 (사용자 지정 데이터 집합) - 고급 임계값 모드 (사용자 지정 데이터 집합)import type { CapacitorConfig } from '@capacitor/cli';
const config: CapacitorConfig = { plugins: { WebviewVersionChecker: { minimumDeviceSharePercent: 3, versionShareByMajor: { '137': 58.2, '136': 21.3, '135': 4.6, '134': 2.1, }, autoPromptOnOutdated: true, }, },};
export default config;만약에 실제 세계에서 공유하는 버전과만 호환성을 원한다면, 이 옵션을 사용하세요.
minimumDeviceSharePercent: 3__CAPGO_KEEP_0__는 설치된 주요 버전이 데이터 집합에서 3% 이상을 나타내야 합니다.versionShareByMajor__CAPGO_KEEP_0__는 사용자 지정 맵입니다. 주요 버전 => 퍼센트.- 만약에 원격 데이터를 사용하는 것을 선호한다면, 이 옵션을 사용하세요.
versionShareApiUrlwith one of:{ "versionShareByMajor": { "137": 54.2, "136": 23.8 } }{ "shareByMajor": { "137": 54.2, "136": 23.8 } }{ "versions": [{ "major": 137, "share": 54.2 }, { "version": "136.0.0.0", "percent": 23.8 }] }
자바스크립트를 사용하는 고급 사용 방법
Advanced usage with JavaScriptimport { WebviewVersionChecker } from '@capgo/capacitor-webview-version-checker';
await WebviewVersionChecker.addListener('webViewOutdated', (status) => { console.log('Outdated WebView detected', status);});
await WebviewVersionChecker.check({ minimumMajorVersion: 124, showPromptOnOutdated: true,});Why use this plugin instead of only Capacitor config
Capgo 플러그인을 사용하는 대신에 Capacitor 설정만 사용하는 이유Section titled “Why use this plugin instead of only Capacitor config”
android: { minWebViewVersion: 124,},server: { errorPath: 'unsupported-webview.html',}Copy to clipboard
이 플러그인은 런타임 이벤트와 네이티브 프롬프트 UX를 추가하여 사용자가 앱을 업데이트하도록 격려받으면서도 앱을 여전히 열고 사용할 수 있도록 합니다.
- 평가 순서:
minimumDeviceSharePercent디바이스-쉐어 임계값 모드 (+ 데이터 세트), 제공된 경우 - 최신 버전 모드 (
latestVersion/latestVersionApiUrl) - 최소 메이저 폴백 (
minimumMajorVersion)
안드로이드 제공자 처리
안드로이드 제공자 처리Capacitor이 안드로이드에서 사용하는 WebView 제공자 모델 모두를 지원합니다.
- 안드로이드 5-6 및 10+: 안드로이드 시스템 웹뷰 (
com.google.android.webview) - 안드로이드 7-9: 구글 크롬 (
com.android.chrome)
Getting Started에서 계속하기
Getting Started에서 계속하기Getting Started를 사용하여 Getting Started 자연어 미디어 및 인터페이스 동작을 계획하려면 @capgo/capacitor-웹뷰 버전 확인기 사용하여 native 기능을 사용하는 @capgo/capacitor-웹뷰 버전 확인기 사용하여 @capgo/capacitor-라이브 활동 사용하여 native 기능을 사용하는 @capgo/capacitor-라이브 활동 사용하여 @capgo/capacitor-라이브 활동 @capgo/capacitor-라이브 활동 implementation detail @capgo/capacitor-비디오 플레이어 사용하여 native 기능을 사용하는 @capgo/capacitor-비디오 플레이어 사용하여 @capgo/capacitor-비디오 플레이어 @capgo/capacitor-비디오 플레이어 implementation detail