시작하기
복사할 수 있는 지시
Set up this Capacitor plugin in the project.
Use the package manager already used by the project.
Install these package(s): `@capgo/capacitor-permissions`
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/permissions/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-permissions` plugin in my project.만약 Manual Setup을 선호한다면, 플러그인을 설치하기 위해 다음 명령어를 실행하고 아래의 플랫폼별 지침을 따르세요:
npm install @capgo/capacitor-permissionsnpx cap sync수입
수입 섹션import { Permissions } from '@capgo/capacitor-permissions';플랫폼 설정
플랫폼 설정 섹션- iOS 설정 Info.plist 사용을 위한
PermissionName. - Android 설정 버전 24 미만의
uses-permissionentries 및 minSdk
사용 방법
사용 방법 섹션import { Permissions } from '@capgo/capacitor-permissions';
export async function ensureCamera(): Promise<boolean> { const { status } = await Permissions.check({ permission: 'camera' }); if (status === 'granted') return true; const { status: afterRequest } = await Permissions.request({ permission: 'camera' }); return afterRequest === 'granted';}상태가 blocked상태가
await Permissions.openSettings({ type: 'application' });