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-shake`
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/shake/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 설치를 사용하여 플러그인을 설치할 수 있습니다. 다음 명령어를 사용하여 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-shake` plugin in my project.만약 Manual Setup을 선호한다면, 플러그인을 설치하기 위해 다음 명령어를 실행하고 아래의 플랫폼별 지침을 따르세요:
bun add @capgo/capacitor-shakebunx cap syncImport
‘Import’라는 제목의 섹션import { CapacitorShake } from '@capgo/capacitor-shake';API 개요
Section titled “API 개요”addListener
Section titled “addListener”장치에서 흔들림 이벤트를 듣습니다.
장치의 가속도계를 사용하여 흔들림 패턴을 감지하여 흔들림 동작이 감지될 때 호출될 리스너를 등록합니다.
import { CapacitorShake } from '@capgo/capacitor-shake';
const listener = await CapacitorShake.addListener('shake', () => { console.log('Shake detected!');});
// To remove the listener:await listener.remove();getPluginVersion
Section titled “getPluginVersion”자바스크립트 Capacitor 플러그인 버전을 가져옵니다.
자바스크립트 플러그인 구현의 현재 버전을 반환합니다.
import { CapacitorShake } from '@capgo/capacitor-shake';
const { version } = await CapacitorShake.getPluginVersion();console.log('Plugin version:', version);이 페이지는 플러그인의 __CAPGO_KEEP_0__ src/definitions.ts. upstream의 API이 변경될 때 다시 싱크를 실행하세요.
Getting Started에서 계속
Getting Started에서 계속하는 섹션Capgo를 사용 중이라면 Getting Started 대시보드와 Capgo 연산을 계획하기 위해, API을 연결하세요. native capability을 위한 @capgo/capacitor-shake 사용 native capability을 위한 @capgo/capacitor-shake 사용 설명 API 개요 API 개요 설명 소개 소개 설명 API 키 implementation 세부 정보에 대한 API 키 장치 implementation 세부 정보에 대한 장치.