Live Update 배포
이 플러그인의 설치 단계와 전체 마크다운 가이드가 포함된 설정 프롬프트를 복사하세요.
Capgo의 Live Updates 기능을 사용하면 앱의 UI와 비즈니스 로직을 실시간으로 원격 업데이트할 수 있습니다. 앱 스토어를 거치지 않고 JS bundle 업데이트를 사용자에게 직접 푸시해 버그를 즉시 수정하고 새 기능을 배포하세요.
이 가이드는 다음 단계를 완료했다고 가정합니다: Capgo 빠른 시작하기 이미 다음을 완료한 상태여야 합니다:
-
설치한
@capgo/capacitor-updaterCapacitor 앱의 SDK -
앱 ID 및 업데이트 채널 설정 완료
capacitor.config.ts -
code에 다음 항목 추가
CapacitorUpdater.notifyAppReady()방법
아직 이 단계들을 완료하지 않았다면, 다시 돌아가서 Quickstart를 먼저 완료해 주세요.
Bundle 업로드하기
“Bundle 업로드하기” 섹션Capgo SDK 설치 및 설정이 완료되었습니다. 이제 첫 번째 live update bundle을 업로드할 준비가 되었습니다:
-
웹 에셋 빌드:
터미널 창 npm run build -
Capgo에 bundle를 upload 하세요:
터미널 창 npx @capgo/cli@latest bundle upload --channel=production.github/workflows/build_and_deploy.yml name: Build source code and send to Capgoconcurrency:group: ${{ github.workflow }}-${{ github.ref }}cancel-in-progress: trueon:push:branches:- mainjobs:deploy_to_capgo:runs-on: ubuntu-lateststeps:- name: Checkoutuses: actions/checkout@v6- uses: actions/setup-node@v6with:node-version: '24'- name: Install dependenciesrun: npm install- name: Buildrun: npm run build- name: Deploy to Capgorun: npx @capgo/cli@latest bundle upload -a ${{ secrets.CAPGO_TOKEN }} --channel ${{ env.CHANNEL }}env:CAPGO_TOKEN: ${{ secrets.CAPGO_TOKEN }}.gitlab-ci.yml stages:- buildbuild:stage: buildimage: node:18cache:- key:files:- package-lock.jsonpaths:- .node_modules/script:- npm install- npm run build- npx @capgo/cli@latest bundle upload -a $CAPGO_TOKEN --channel $CAPGO_CHANNELartifacts:paths:- node_modules/- dist/only:- master명령어에 지정된 channel로 새로운 bundle 버전이 upload 됩니다.
Upload 문제 해결
“Upload 문제 해결” 섹션Upload에 실패했다면 다음을 확인하세요:
- 다음에 있는 App ID가
capacitor.config.tsCapgo dashboard의 앱과 일치하는지 - Capacitor 프로젝트 루트에서 업로드 명령어를 실행 중인지
- 웹 에셋이 빌드되어 최신 상태인지
문제가 계속되면 다음 문제 해결 섹션으로 이동하세요.
기기에서 Update 받기
“기기에서 Update 받기” 섹션bundle 업로드가 완료되면, 기기에서 live update를 테스트할 수 있습니다:
-
앱을 기기에 sync하세요:
터미널 창 npx cap sync ios -
다른 터미널을 열고 다음 명령어를 실행해 업데이트 상태를 확인하세요:
터미널 창 npx @capgo/cli@latest app debug -
앱을 로컬에서 실행하세요:
터미널 창 npx cap run ios또는 Xcode/Android Studio에서 iOS/Android 프로젝트를 열어 native run을 진행하세요.
-
업데이트가 백그라운드에서 다운로드될 수 있도록 앱을 약 30초 동안 열어두세요.
-
로그에 업데이트 상태가 표시되기까지 몇 초 정도 걸릴 수 있습니다.
-
앱을 종료 후 다시 실행하세요. live update가 적용된 것을 확인할 수 있습니다!
자세한 내용은 다음을 Capgo 빠른 시작하기 참고하여 live updates 테스트를 진행하세요.
다음 단계
“다음 단계” 섹션Capgo를 사용하여 첫 live update 배포에 성공하신 것을 축하합니다! 🎉
더 자세한 내용은 다음의 나머지 Capgo Live Updates 문서를검토해 보세요. 다음에 확인하면 좋은 주요 주제입니다:
Live Update 배포 다음 단계
“Live Update 배포 다음 단계” 섹션사용 중이라면 Live Update 배포 CI/CD 자동화를 계획하려면, 다음을 연결하세요 Capgo CI/CD 설정하기 Capgo CI/CD의 제품 워크플로우용, Capgo Native Build Capgo Native Builds의 제품 워크플로우용, Capgo 연동 서비스 Capgo Integrations의 제품 워크플로우용, CI/CD 통합 CI/CD Integration의 구현 세부 사항은, 그리고 GitHub Actions 연동 GitHub Actions Integration의 구현 세부 사항을 참고하세요.