Cordova 업데이터 사용 시작
설치 단계와 이 플러그인의 전체 마크다운 가이드를 포함한 설정 지시문을 복사하세요.
Set up this Capacitor plugin in the project.
Use the package manager already used by the project.
Install these package(s): `@capgo/cordova-updater`
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/cordova-updater/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.
이 가이드는 플러그인을 추가하는 방법을 안내합니다. @capgo/cordova-updater to a Cordova app so you can receive Capgo live updates on iOS and Android.
Cordova 12+
Cordova Android 13+ 및/또는 Cordova iOS 7+- Cordova CLI 12+
- A
- A Capgo account (capgo.app/register)
설치
설치-
npm에서 플러그인을 설치하고 Capgo 앱 ID를 입력하세요.
터미널 창 cordova plugin add @capgo/cordova-updater --variable APP_ID=YOUR_CAPGO_APP_ID -
(선택) 설치 시 기본값을 재정의하려면 Capacitor 업데이터의 동일한 변수를 사용하세요.
터미널 창 cordova plugin add @capgo/cordova-updater \--variable APP_ID=YOUR_CAPGO_APP_ID \--variable DEFAULT_CHANNEL=production \--variable UPDATE_URL=https://plugin.capgo.app/updates \--variable AUTO_UPDATE=atBackground -
플러그인 변수를 변경한 후 네이티브 프로젝트를 준비하세요.
터미널 창 cordova prepare android ios
자바스크립트 사용
자바스크립트 사용 섹션이후 deviceready플러그인은 cordova.plugins.Updater:
document.addEventListener('deviceready', async () => { const { Updater } = cordova.plugins;
await Updater.notifyAppReady();
const latest = await Updater.getLatest(); if (latest.url && !latest.error) { const bundle = await Updater.download({ url: latest.url, version: latest.version, checksum: latest.checksum, });
await Updater.next({ id: bundle.id }); }});npm 패키지에 TypeScript 타입이 포함되어 있습니다.
import type { UpdaterPlugin } from '@capgo/cordova-updater';
declare const cordova: { plugins: { Updater: UpdaterPlugin } };플랫폼 참고 사항
섹션 제목 “플랫폼 참고 사항”- Cordova Android 13+이 필요하므로 WebView는 기본으로 제공됩니다.
https://localhost/scheme. - The plugin registers a
CordovaPluginPathHandler다운로드 된 배포물 자산을 제공하기 위해
- 기본값으로 Cordova iOS 7+가 필요합니다.
app://localhost/scheme. - The plugin implements
CDVPluginSchemeHandler배포물 요청을 가로채기 위해
첫 번째 배포물 업로드
제목 “첫 번째 배포물 업로드”웹 자산을 빌드한 후 Capgo CLI (Capacitor와 동일한 워크플로우)로 업로드하세요.
bun run buildbunx @capgo/cli@latest bundle upload --channel=production다음 단계
Next steps- 설정과 "__CAPGO_KEEP_0__" 업데이터 구성 요소를 비교하세요. Capacitor 업데이터 구성 요소와의 설정을 비교하세요. — 대부분의 옵션은 변수에 매핑됩니다.
plugin.xml변수. - 읽기 라이브 업데이트 호환성 네이티브 플러그인 변경을 배송하기 전에 읽어보세요.
- Migrating to Capacitor later? Keep the same Capgo app ID and channels; only the client plugin package changes.