__CAPGO_KEEP_5__
설치 단계와 이 플러그인의 전체 마크다운 가이드를 포함한 설정 프롬프트를 복사하십시오.
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 -
플랫폼 동작을 검토하세요
- Read the iOS에 대한 앱 switcher 동작에 대한
- Read the Android에 대한 스크린샷 및 녹화 동작에 대한
기본 동작
기본 동작플러그인은 네이티브 구현이 로드될 때 자동으로 개인 정보 보호를 활성화합니다.
- 안드로이드에서, 보안 모드는 스크린샷, 스크린 녹화 캡처 및 최근 앱 프리뷰를 차단합니다.
- iOS에서, 플러그인은 앱 switcher 스냅샷 생성 시 앱을 숨깁니다.
- 웹에서 플러그인은 API 홀수만큼 메모리에서 활성화된 플래그를 유지합니다.
기본 사용 방법
기본 사용 방법import { 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 미리보기가 표시되도록 필요할 때
- 신뢰할 수 있는 기기에서 제어된 디버깅 세션
보호를 즉시 복원하세요. enable().