Skip to content

Getting Started

GitHub

You can use our AI-Assisted Setup to install the plugin. Add the Capgo skills to your AI tool using the following command:

Terminal window
npx skills add https://github.com/Cap-go/capgo-skills --skill capacitor-plugins

Then use the following prompt:

Use the `capacitor-plugins` skill from `Cap-go/capgo-skills` to install the `@capgo/capacitor-privacy-screen` plugin in my project.

If you prefer Manual Setup, install the plugin by running the following commands and follow the platform-specific instructions below:

  1. Install the plugin

    Terminal window
    bun add @capgo/capacitor-privacy-screen
  2. Sync native platforms

    Terminal window
    bunx cap sync
  3. Review platform behavior

The plugin enables privacy protection automatically when the native implementation loads.

  • On Android, secure mode blocks screenshots, screen recording capture, and the recent apps preview.
  • On iOS, the plugin hides your app during app switcher snapshot generation.
  • On Web, the plugin keeps an in-memory enabled flag only for API parity.
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);

Use disable() only when the current screen should remain visible in system previews or be capturable by the user, for example:

  • account verification steps that require screenshots for support
  • payment or identity-provider flows that need a visible app switcher preview
  • controlled debugging sessions on trusted devices

Restore protection immediately afterward with enable().

If you are using Getting Started to plan security and compliance, connect it with Using @capgo/capacitor-privacy-screen for the native capability in Using @capgo/capacitor-privacy-screen, Encryption for the implementation detail in Encryption, Compliance for the implementation detail in Compliance, Capgo Security Scanner for the product workflow in Capgo Security Scanner, and Capgo Security for the product workflow in Capgo Security.