시작하기
설치
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 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-shake` plugin in my project.Manual Setup을 사용하는 경우, 플러그인을 설치하려면 다음 명령어를 실행하고 아래 플랫폼별 지침을 따르세요:
bun add @capgo/capacitor-shakebunx cap syncImport
Import 제목import { CapacitorShake } from '@capgo/capacitor-shake';API 개요
API 개요 제목addListener
addListener 제목장치에서 흔들림 이벤트를 듣습니다.
__CAPGO_KEEP_0__ shake 이벤트 리스너를 등록합니다. 장치의 가속도계를 사용하여 흔들림 패턴을 감지합니다.
import { CapacitorShake } from '@capgo/capacitor-shake';
const listener = await CapacitorShake.addListener('shake', () => { console.log('Shake detected!');});
// To remove the listener:await listener.remove();getPluginVersion
__CAPGO_KEEP_0__ 플러그인 버전 가져오기Capacitor 플러그인 버전 가져오기
__CAPGO_KEEP_0__ 플러그인 버전 가져오기
import { CapacitorShake } from '@capgo/capacitor-shake';
const { version } = await CapacitorShake.getPluginVersion();console.log('Plugin version:', version);실질적인 출처
제목: 진실의 근원이 페이지는 플러그인의 src/definitions.ts다시 싱크를 실행할 때 공개 API upstream에서 변경되면.
Getting Started에서 계속
제목: Getting Started에서 계속이 플러그인을 사용하는 경우 Getting Started 계획 대시보드 및 API 운영을 위해, 이 플러그인을 Using @capgo/capacitor-shake Using @capgo/capacitor-shake API 개요 API 개요 소개 소개에 대한 구현 세부 정보를 위해 API 키 API 키에 대한 구현 세부 정보를 위해, 그리고 장치 장치에 대한 구현 세부 정보를 위해