시작하기
설치
Set up this Capacitor plugin in the project.
Use the package manager already used by the project.
Install these package(s): `@capgo/capacitor-privacy-screen`
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/privacy-screen/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.
-
플러그인을 설치하세요
터미널 창 bun add @capgo/capacitor-privacy-screen -
자연 플랫폼 동기화
터미널 창 bunx cap sync -
플랫폼 동작을 검토하세요
기본 동작
기본 동작Capgo 플러그인은 네이티브 구현이 로드될 때 자동으로 개인 정보 보호를 활성화합니다.
- 안드로이드에서 secure 모드는 스크린샷, 스크린 녹화 캡처 및 최근 앱 프리뷰를 차단합니다.
- iOS에서 플러그인은 앱 Switcher 스냅샷 생성 시 앱을 숨깁니다.
- 웹에서 플러그인은 API 동기만을 위해 메모리 내에 활성화 플래그만 유지합니다.
기본 사용 방법
Copy to clipboardimport { PrivacyScreen } from '@capgo/capacitor-privacy-screen';
await PrivacyScreen.disable();
// Run a flow where screenshots or previews are temporarily allowed.
await PrivacyScreen.enable();
const { enabled } = await PrivacyScreen.isEnabled();console.log('Privacy screen enabled:', enabled);사용 disable() 스크린샷을 찍거나 시스템 프리뷰에서 현재 화면이 보이도록 유지하거나 사용자가 캡처할 수 있도록 하려면, 예를 들어:
- 계정 확인 단계가 지원을 위해 스크린샷이 필요합니다.
- 인증 공급자 또는 결제 흐름이 앱 Switcher의 가시적인 미리보기가 필요한 경우
- trusted device의 안전한 장치에서 제어된 디버깅 세션
__CAPGO_KEEP_0__ __CAPGO_KEEP_1__으로 즉시 보호를 재설정하세요. enable().