Getting Started
이 플러그인의 설치 단계와 전체 마크다운 가이드를 포함한 설정 지시를 복사하세요.
Set up this Capacitor plugin in the project.
Use the package manager already used by the project.
Install these package(s): `@capgo/capacitor-auto`
Run the required Capacitor sync/update step after installation.
Read this markdown guide for the full setup steps: https://raw.githubusercontent.com/Cap-go/website/refs/heads/main/apps/docs/src/content/docs/docs/plugins/auto/getting-started.mdx
Use that guide for platform-specific steps, native file edits, permissions, config changes, imports, and usage setup.
If that guide references other docs pages, read them too.
설치
설치 섹션 제목AI-Assisted Setup을 사용하여 플러그인을 설치할 수 있습니다. AI 도구에 Capgo 기능을 추가하려면 다음 명령어를 사용하세요:
npx skills add https://github.com/Cap-go/capgo-skills --skill capacitor-plugins다음과 같은 프롬프트를 사용하세요:
Use the `capacitor-plugins` skill from `Cap-go/capgo-skills` to install the `@capgo/capacitor-auto` plugin in my project.Manual Setup을 선호한다면, 플러그인을 설치하기 위해 다음 명령어를 실행하고 아래에 플랫폼별로 설명된 지침을 따르세요:
-
패키지 설치
터미널 창 npm i @capgo/capacitor-auto -
자연스러운 프로젝트 동기화
__CAPGO_KEEP_0__ npx cap sync -
__CAPGO_KEEP_0__
import { Auto } from '@capgo/capacitor-auto';await Auto.setRootTemplate({title: 'Garage',sections: [{header: 'Doors',items: [{id: 'open-main-door',title: 'Open main door',subtitle: 'Tap to send the action to the phone app',payload: { doorId: 'main' },},],},],}); -
__CAPGO_KEEP_0__
await Auto.addListener('carAction', async (event) => {if (event.id === 'open-main-door') {await openGarageDoor(event.payload?.doorId);}}); -
__CAPGO_KEEP_0__
const status = await Auto.isAvailable();console.log(status.available, status.connected, status.platform);await Auto.addListener('connectionChanged', (event) => {console.log('Car connected:', event.connected, event.platform);});
__CAPGO_KEEP_1__
빈 상태설정 emptyText 템플릿이 행이 없을 때:
await Auto.setRootTemplate({ title: 'Garage', emptyText: 'No actions are available right now.', sections: [],});브리지 메시지 전송
브리지 메시지 전송사용 sendMessage 자체 정의된 네이티브 브리지 메시지:
await Auto.sendMessage({ type: 'status', payload: { online: true },});플랫폼 설정
설정- 설명서를 따르세요 iOS 설정 CarPlay 장면 및 권한 참고 항목 페이지
- Getting Started에서 계속 Android 설정 Android Auto 카테고리 및 매니페스트 참고 항목 페이지
Getting Started에서 계속
Capacitor 플러그인 개발을 위해Capacitor 플러그인 개발을 위해 native 플러그인 작업을 계획하고 @__CAPGO_KEEP_0__/__CAPGO_KEEP_1__-auto를 사용하여 native 기능과 연결합니다. Capacitor 플러그인 개발을 위해 native 플러그인 작업을 계획하고 @__CAPGO_KEEP_0__/__CAPGO_KEEP_1__-auto를 사용하여 native 기능과 연결합니다. Getting Started Using @capgo/capacitor-auto for the native capability in Using @capgo/capacitor-auto, Capgo 플러그인 디렉토리 Capgo 플러그인 디렉토리에서 제품 워크플로우를 위해 Capacitor 플러그인들에 의해 Capgo Capacitor 플러그인들에 의해 Capgo에서 구현 세부 정보를 위해 플러그인 추가 또는 업데이트 플러그인 추가 또는 업데이트에서 구현 세부 정보를 위해, 그리고 아이오닉 엔터프라이즈 플러그인 대체 아이오닉 엔터프라이즈 플러그인 대체에서 제품 워크플로우를 위해