Capgo 저장소 보기
Capgo에서 __CAPGO_KEEP_0__ 보기
Using @capgo/cordova-updater
@capgo/cordova-updater brings Capgo live updates to Cordova iOS and Android apps with the same JavaScript API as @capgo/capacitor-updaterCordova 업데이터 사용 notifyAppReady() Cordova 업데이터가 Cordova iOS 및 Android 앱에 __CAPGO_KEEP_1__를 사용하여 Capgo Live Update를 제공합니다. @capgo/cli.
Cordova 플러그인을 설치하고
cordova plugin add @capgo/cordova-updater --variable APP_ID=com.example.app
cordova prepare android ios
이미지 업로드
document.addEventListener('deviceready', async () => {
const { Updater } = cordova.plugins;
await Updater.notifyAppReady();
const { bundle } = await Updater.current();
console.log('Active bundle', bundle);
const latest = await Updater.getLatest();
if (latest.url && !latest.error) {
const downloaded = await Updater.download({
url: latest.url,
version: latest.version,
checksum: latest.checksum,
});
await Updater.next({ id: downloaded.id });
}
});
플랫폼 요구 사항
- 코르도바 안드로이드 13+ 및 코르도바 iOS 7+
- 기본 코르도바 웹 뷰 스키마 (
https://localhost/안드로이드에서app://localhost/iOS에서) - 피해야 할 것
cordova-plugin-ionic-webview— 새로운 번들 교환을 방지합니다
새로운 번들을 배포
bun run build
bunx @capgo/cli@latest bundle upload --channel=production
실용적인 조언
- 같은 Capgo 앱 ID와 채널을 재사용하고 Capacitor 또는 Electron 클라이언트도 배포한다면.
- 네이티브 플러그인 또는 코르도바 플랫폼 업그레이드를 다른 네이티브 변경과 같이 다루세요: 새로운 네이티브 API를 사용하는 자바스크립트 번들을 의존하기 전에 새로운 스토어 바이너리를 배포하세요.
- 전체 설정 세부 정보는 Cordova 업데이터 문서.