시작하기
이 플러그인의 설치 단계와 전체 마크다운 가이드가 포함된 설정 프롬프트를 복사하세요.
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 스킬을 추가하세요:
bunx 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.수동 설정을 선호한다면, 다음 명령어를 실행하여 플러그인을 설치하고 아래의 플랫폼별 지침을 따르세요:
bun add @capgo/capacitor-permissionsbunx cap sync가져오기
“Import” 섹션import { Permissions } from '@capgo/capacitor-permissions';빠른 시작
“빠른 시작” 섹션import { Permissions } from '@capgo/capacitor-permissions';
const { status } = await Permissions.check({ permission: 'camera' });예시: request
“예시: request” 섹션import { Permissions } from '@capgo/capacitor-permissions';
const { status } = await Permissions.request({ permission: 'notifications' });예시: checkMultiple
“예시: checkMultiple” 섹션import { Permissions } from '@capgo/capacitor-permissions';
const { statuses } = await Permissions.checkMultiple({ permissions: ['camera', 'microphone'],});자주 하는 실수
“흔한 실수” 섹션- 네이티브 동기화: 실행
bunx cap sync플러그인 업그레이드 후. - 신뢰할 수 있는 소스: 신뢰
src/definitions.tsGitHub 레포지토리에서.
플랫폼 설정
“플랫폼 설정” 섹션- iOS 설정 Info.plist 사용 설명 문자열별
PermissionName. - Android 설정 위해
uses-permission엔트리와 minSdk 24.
사용량
“Usage” 섹션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' });