이동 요약
- Capgo 개발 팀이 배포된 앱으로 라이브 앱을 전송하는 데 도움을 주는 서비스입니다.
- Capacitor jQuery Mobile, Framework 7, Sencha, KendoUI, Ionic 또는 사용자 정의 솔루션과 같은 jQuery Mobile, Framework 7, Sencha, KendoUI, Ionic 또는 사용자 정의 솔루션과 같은 JavaScript 앱을 이중화할 수 있습니다. 기존의 Ionic 앱이 필요하지 않습니다..
- Colt App Center Build (Android/iOS 앱 빌드)와 같은 서비스를 제공하는 Colt가 있습니다. 테스트, 디버깅 및 분석 서비스도 제공합니다.
주의
Cordova를 사용하는 앱이 아직 있다면 Capacitor 으로 이중화해야 합니다. 그 다음 Capgo로 이중화할 수 있습니다.
Ionic 팀이 Cordova의 영적 후계자로 개발된 Capacitor, native 도구와 기능에 접근할 수 있도록 개발을 가까이하고, 사용자 경험과 성능을 향상시키기 위해 개발되었습니다.
운이 좋게도, 마이그레이션 프로세스는 쉽고 Cordova 플러그인의 대부분은 Capacitor과 뒤로兼容합니다. 이동 시작하기.
Capgo에 대해
Capgo은 앱을 시간에 따라 업데이트하는 것을 처리합니다. 개발 팀은 앱의 고유한 기능에만 집중하고 Capgo으로부터 복잡한 앱 배포 프로세스를 외주로 맡길 수 있습니다.
Capgo은 웹 배포와 모바일 사이의 빈틈을 채웁니다.
Capgo Prerequisites
App Center와 같이 Capgo GitHub은 Azure DevOps, Bitbucket, GitHub, 및 GitLab의 Git 저장소에 호스팅된 앱을 지원합니다.
Capgo CLI 설치
주의
Node와 NPM이 컴퓨터에 설치되어야 하는 것을 확인한 후 진행하세요. 항상 NPM을 사용하세요. 현재 LTS 버전 Capgo 이하 버전은 사용하지 마십시오.
만들기 package.json 및 Capacitor 설정 파일
주의
시작하기 전에,私は新しい Git branch에서 변경을 추천합니다.
그리고 Capgo capacitor가 capacitor 앱을 자동화하기 위해 만들어졌기 때문에, 앱이 가지고 있지 않을 수 있는 하나의 파일이 필요합니다. 먼저, 파일을 만들십시오. 파일을 만들기 가장 쉬운 방법은 앱의 루트에서 다음 명령어를 실행하는 것입니다. capacitor.config.json 그런 다음, __CAPGO_KEEP_0__을 __CAPGO_KEEP_1__ 설문조사에 따라 초기화하십시오.
npm install @capacitor/core
Then, initialize Capacitor using the CLI questionnaire:
npx cap init
CLI
마지막으로, 프로젝트에 새로운 파일을 커밋하세요:
git add .git commit -m "added package json and capacitor config" && git push
이동할 Code
이제 새로운 __CAPGO_KEEP_0__ 파일이 위치한 곳에 주의를 기울일 수 있습니다. Capgo 실제 앱에 주목할 수 있습니다. Capgo 전체 빌드된 앱이 __CAPGO_KEEP_0__ 이라는 디렉토리 안에 있어야 합니다. dist.
빌드된 code 이 디렉토리 안에 없다면, code config 파일에서 이 값을 변경하세요. dist directory, change this value in the Capacitor config file.
앱 구조

Capgo
앱이 준비되면 Capgo 등록을 위해 가입하고 API 키를 받으세요. 첫 번째 버전을 업로드하기 위해 Capgo 계정에 가입하세요..
Capgo에 로그인한 후 계정 페이지로 이동한 후 API 키를 클릭한 후 '쓰기' 키를 클릭하여 클립보드에 복사하세요.
Capgo SDK를 설치하세요.
명령 프롬프트에서 Capacitor 앱 폴더의 루트 디렉토리에서 다음 명령어를 실행하세요.
npm i @capgo/capacitor-updater && npx cap sync
Capacitor 앱에 플러그인을 설치하세요.
code를 CodePush 대체로 앱에 추가하세요.
import { CapacitorUpdater } from '@capgo/capacitor-updater'
CapacitorUpdater.notifyAppReady()
이것은 네이티브 플러그인에 설치가 성공적으로 완료되었다는 것을 알려줍니다.
실시간 업데이트 (CodePush 대체)
실시간 업데이트 기능은 설치된 __CAPGO_KEEP_1__를 사용하여 작동합니다. Capgo SDK __CAPGO_KEEP_0__에서 특정 Deploy Channel Destination을 듣기 위해 Native 애플리케이션에 추가합니다. 웹 빌드가 채널 목적지에 할당되면, 지정된 채널 목적지에 연결된 사용자 기기에서 업데이트가 배포됩니다.
Capgo에 로그인하세요.
__CAPGO_KEEP_0__에 로그인하기 위해 사용하는 __CAPGO_KEEP_0__ API Key를 사용하세요. all 첫 번째 앱을 추가하세요. CLI Cloud에서 __CAPGO_KEEP_1__을 사용하여 첫 번째 앱을 생성하세요.
npx @capgo/cli@latest login YOURKEY
__CAPGO_KEEP_0__ config 파일에 정의된 모든 변수를 사용하여 앱을 생성합니다.
Let’s get started by first creating the app in Capgo Cloud with the CLI.
npx @capgo/cli@latest app add
Capacitor을 빌드하고 __CAPGO_KEEP_1__에 보내려면 다음 명령어를 실행하세요.
기본적으로 버전 이름은 __CAPGO_KEEP_0__에 있습니다.
code에서 Capgo으로 code을 업로드하세요.
npx @capgo/cli@latest bundle upload --channel production
__CAPGO_KEEP_0__에서 __CAPGO_KEEP_1__으로 __CAPGO_KEEP_0__을 업로드하세요. package.json 파일.
Check in Capgo 만들어졌는지 확인합니다.
__CAPGO_KEEP_0__ 에서 테스트할 수 있습니다..
__CAPGO_KEEP_0__
After you have sent your app to Capgo, you need to make your channel default Capgo
npx @capgo/cli@latest channel set production -s default
에 앱을 제출한 후에 __CAPGO_KEEP_0__
에서 업데이트를 받을 수 있도록 __CAPGO_KEEP_0__
import { CapacitorUpdater } from '@capgo/capacitor-updater'
CapacitorUpdater.notifyAppReady()
채널을 설정하세요.','.','__CAPGO_KEEP_0__ npm run build && npx cap copy 앱을 업데이트하세요.
장치에서 실시간 업데이트 수신
Deploy에서 실시간 업데이트를 받으려면, 앱을 장치나 에뮬레이터에서 실행해야 합니다. 이 작업을 쉽게 하려면, 다음 명령어를 사용하여 로컬 앱을 에뮬레이터나 컴퓨터에 연결된 장치에서 실행하세요.
npx cap run [ios | android]
앱을 열고 배경에 두고 다시 열면, 로그에 앱이 업데이트가 된 것을 확인할 수 있습니다.
축하합니다! 🎉 첫 번째 실시간 업데이트를 성공적으로 배포했습니다. 실시간 업데이트와 같은 기능을 더 많이 사용할 수 있습니다. 더 자세한 내용은 Live Updates 문서를 참조하세요. 실시간 업데이트스 문서.
앱 센터 종속성 제거
Now that we’ve integrated Capgo’s services, you should remove any references to App Center. Besides being a best practice to remove unused code/services, removing the SDK should reduce the size of your apps.
첫 번째, 터미널을 열고 App Center 플러그인을 제거하세요:
cordova plugin remove cordova-plugin-appcenter-analytics cordova-plugin-appcenter-crashes cordova-plugin-code-push
다음으로, config.xml 및 다음 값을 제거하세요. 그들은 다음과 같은 형태일 것입니다: preference __CAPGO_KEEP_2__
<preference name="APP_SECRET" value="0000-0000-0000-0000-000000000000" /><preference name="CodePushDeploymentKey" value="YOUR-ANDROID-DEPLOYMENT-KEY" /><preference name="CodePushPublicKey" value="YOUR-PUBLIC-KEY" />
If you were using App Center Analytics in your app, remove the following preferences elements: APPCENTER_ANALYTICS_ENABLE_IN_JS and APPCENTER_CRASHES_ALWAYS_SEND.
Remove the following <access /> elements:
<access origin="https://codepush.appcenter.ms" /><access origin="https://codepush.blob.core.windows.net" /><access origin="https://codepushupdates.azureedge.net" />
Remove the reference to CodePush in the CSP meta tag in the index.html file (https://codepush.appcenter.ms):
<meta http-equiv="Content-Security-Policy" content="default-src https://codepush.appcenter.ms 'self' data: gap: https://ssl.gstatic.com 'unsafe-eval'; style-src 'self' 'unsafe-inline'; media-src *" />
Finally, within your app, remove any code references to App Center services, such as codePush.sync();.
Next Steps
You’ve migrated from App Center to Capgo, utilizing the Live Updates. This is just the beginning of what you can use Capgo for. Explore the rest of the service includes Channel (multiple environments) and override. Cloud CLI integration, use Capgo inside your CI/CD platform of choice (such as GitHub Action, GitLab, Jenkins, and more).
Automatic send app update
If your code is hosted on GitHub, you can set up automatic build and release in a few more steps, thanks to GitHub actions.
__CAPGO_KEEP_0__으로 이 문서를 계속하기 위해 Migrating from App Center to __CAPGO_KEEP_0__ 문서를 참고하세요.
__CAPGO_KEEP_3__
__CAPGO_KEEP_4__ __CAPGO_KEEP_5__ __CAPGO_KEEP_6__ __CAPGO_KEEP_7____CAPGO_KEEP_8__ __CAPGO_KEEP_9__ __CAPGO_KEEP_10__
Keep going from Migrating from App Center to Capgo
__CAPGO_KEEP_12__ Migrating from App Center to Capgo __CAPGO_KEEP_14__ Capgo 기업 버전 Capgo 기업 버전의 제품 워크플로우를 위해, 아이오닉 기업 플러그인 대체 아이오닉 기업 플러그인 대체의 제품 워크플로우를 위해, Capgo 대체 Capgo 대체의 제품 워크플로우를 위해, Capgo 컨설팅 Capgo 컨설팅 및 Capgo 프리미엄 지원 Capgo 프리미엄 지원의 제품 워크플로우를 위해,