수동 업데이트
설치 단계와 이 플러그인의 전체 마크다운 가이드를 포함한 설정 프롬프트를 복사하세요.
설정
설정 섹션앱에 추가하세요 capacitor.config.json, 자동 업데이트 기능을 비활성화합니다.
// capacitor.config.json{ "appId": "**.***.**", "appName": "Name", "plugins": { "CapacitorUpdater": { "autoUpdate": "off", } }}사용
사용 방법이 예제를 사용하거나 앱 내에서 논리를 재생성하세요.
import { CapacitorUpdater } from '@capgo/capacitor-updater'import { SplashScreen } from '@capacitor/splash-screen'import { App } from '@capacitor/app'let data = {version: ""}CapacitorUpdater.notifyAppReady()App.addListener('appStateChange', async(state) => { if (state.isActive) { // Do the download during user active app time to prevent failed download data = await CapacitorUpdater.download({ version: '0.0.4', url: 'https://github.com/Cap-go/demo-app/releases/download/0.0.4/dist.zip', }) } if (!state.isActive && data.version !== "") { // Do the switch when user leave app SplashScreen.show() try { await CapacitorUpdater.set(data) } catch (err) { console.log(err) SplashScreen.hide() // in case the set fail, otherwise the new app will have to hide it } } })__CAPGO_KEEP_0__
“Keep going from Manual Update”만약에 수동 업데이트 을 사용 중이라면 Using @capgo/capacitor-업데이터 Using @capgo/capacitor-업데이터 Capgo 기업 for the product workflow in Capgo 기업 Ionic Enterprise 플러그인 대체 for the product workflow in Ionic Enterprise 플러그인 대체 Capgo 대체 for the product workflow in Capgo 대체 Capgo Consulting Capgo Consulting을 위한 제품 워크플로우