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.
Capgo의 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.__CAPGO_KEEP_1__
-
__CAPGO_KEEP_2__
__CAPGO_KEEP_3__ npm i @capgo/capacitor-auto -
__CAPGO_KEEP_4__
__CAPGO_KEEP_3__ npx cap sync -
__CAPGO_KEEP_5__
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);}}); -
연결 상태 추적
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);});
빈 상태
빈 상태설정 emptyText 템플릿이 행이 없을 때:
await Auto.setRootTemplate({ title: 'Garage', emptyText: 'No actions are available right now.', sections: [],});브리지 메시지 전송
브리지 메시지 전송Use sendMessage for application-defined native bridge messages:
await Auto.sendMessage({ type: 'status', payload: { online: true },});Platform setup
Section titled “Platform setup”- Follow the iOS setup page for CarPlay scene and entitlement notes.
- Follow the 애플리케이션 정의 네이티브 브리지 메시지에 사용하세요: page for Android Auto category and manifest notes.
플랫폼 설정
Getting Started에서 계속하기Capgo를 사용 중이라면 Getting Started Capgo를 사용하여 네이티브 플러그인 작업을 계획하고 연결하려면 Capgo를 사용하여 @capgo/capacitor-auto를 사용하여 네이티브 기능을 사용하는 경우 Capgo를 사용하여 @capgo/capacitor-auto를 사용하는 경우 Capgo 플러그인 디렉토리 for the product workflow in Capgo Plugin Directory, Capacitor 플러그인들에 의해 Capgo Capgo 플러그인들에 의해 Capacitor 플러그인들에 의해 Capgo Capgo를 사용하여 플러그인을 추가하거나 업데이트하는 경우 Capgo를 사용하여 플러그인을 추가하거나 업데이트하는 경우 Ionic Enterprise Plugin Alternatives Ionic Enterprise Plugin Alternatives의 제품 워크플로우에 대해.