API 업데이트
설치 단계와 이 플러그인의 전체 마크다운 가이드를 포함하는 설정 프롬프트를 복사하세요.
code의 예시입니다. JavaScript에서 플러그인 업데이트를 보내는 방법입니다.
interface AppInfos { version_name: string version_build: string version_os: string custom_id?: string is_prod?: boolean is_emulator?: boolean plugin_version: string platform: string app_id: string device_id: string}
export const handler: Handler = async (event) => { const body = JSON.parse(event.body || '{}') as AppInfos const { platform, app_id, version_os, device_id, version_name, version_build, plugin_version, } = body console.log('update asked', platform, app_id, version_os, device_id, version_name, version_build, plugin_version) if (version_name === '1.0.0') { return { version: '1.0.1', url: 'https://apiurl.com/mybuild_101.zip', checksum: 'sha256_checksum_of_bundle', } } else if (version_name === '1.0.1') { return { version: '1.0.2', url: 'https://apiurl.com/mybuild_102.zip', checksum: 'sha256_checksum_of_bundle', } } else { return { message: 'Error version not found' version: '', url: '', } }}응답 형식
응답 형식 섹션위치 비암호화된 번들업데이트를 처리하는 경우,
{ "version": "1.0.2", "url": "https://apiurl.com/mybuild_102.zip", "checksum": "sha256_checksum_of_bundle"}위의 경우, 암호화된 번들클립보드 복사
{ "version": "1.0.2", "url": "https://apiurl.com/mybuild_102.zip", "checksum": "encrypted_checksum_from_encrypt_command", "session_key": "ivSessionKey_from_encrypt_command"}클립보드 복사 message 업데이트나 오류가 없으면, error:
{ "message": "Version not found", "error": "The backend crashed", "version": "1.0.2",}클립보드 복사
Field DescriptionschecksumField Descriptionssession_key: 암호화된 번들에만 필요 - 이 것은ivSessionKeyencrypt 명령어로 반환되는version: semver 형식의 버전 식별자 : 암호화된 번들이 다운로드할 수 있는 HTTPS URLurl번들 생성
자동 업데이트 문서를 참조하세요 암호화된 번들과 관련된 내용은 .
암호화된 번들 문서를 참조하세요 암호화된 번들의 완전한 암호화 워크플로우를 설명합니다. which explains the complete encryption workflow.
업데이트 API 엔드포인트에서 계속 진행하세요
업데이트 API 엔드포인트에서 계속 진행하세요CI/CD 자동화 계획을 사용하는 경우 __CAPGO_KEEP_0__ CI/CD 업데이트 API 엔드포인트 @__CAPGO_KEEP_0__/__CAPGO_KEEP_1__-업데이터를 사용하여 native 기능을 사용하는 @capgo/capacitor-업데이터 for the native capability in Using @capgo/capacitor-updater, CI/CD Capgo native 기능 Capgo native 기능 Capgo for the product workflow in Capgo Native Builds, Capgo Integrations Capgo 제품 워크플로우에 대한 Capgo 통합과 CI/CD 통합 __CAPGO_KEEP_0__ CI/CD 통합에 대한 구현 세부 정보