Skip to main content
@capgo/capacitor-privacy-screen Auth & Security Open source

Privacy Screen Capacitor plugin

Protect app content in Android screenshots and obscure the iOS app switcher snapshot

Install

bun add @capgo/capacitor-privacy-screen bunx cap sync
npm, pnpm or yarn
  • npm install @capgo/capacitor-privacy-screen
  • pnpm add @capgo/capacitor-privacy-screen
  • yarn add @capgo/capacitor-privacy-screen

Guide

How to use Privacy Screen in Capacitor

Test on device

Download the Capgo app, then scan the QR code.

Privacy Screen plugin preview QR code

Using @capgo/capacitor-privacy-screen

Capacitor API for protecting app content from the app switcher preview.

Install

bun add @capgo/capacitor-privacy-screen
bunx cap sync

What This Plugin Exposes

  • enable - Enables the privacy screen.
  • disable - Disables the privacy screen.
  • isEnabled - Returns the current enabled state.

Example Usage

enable

Enables the privacy screen.

import { PrivacyScreen } from '@capgo/capacitor-privacy-screen';

const result = await PrivacyScreen.enable();
console.log(result);

disable

Disables the privacy screen.

import { PrivacyScreen } from '@capgo/capacitor-privacy-screen';

const result = await PrivacyScreen.disable();
console.log(result);

isEnabled

Returns the current enabled state.

import { PrivacyScreen } from '@capgo/capacitor-privacy-screen';

const result = await PrivacyScreen.isEnabled();
console.log(result);

Full Reference

Keep going from Using @capgo/capacitor-privacy-screen

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

FAQ

Privacy Screen plugin FAQ

How do I install the Privacy Screen plugin in a Capacitor app?

Run "bun add @capgo/capacitor-privacy-screen" (or "npm install @capgo/capacitor-privacy-screen"), then run "bunx cap sync" so the iOS and Android projects pick up the native code. Import it from "@capgo/capacitor-privacy-screen" in your app code.

Does @capgo/capacitor-privacy-screen work with React, Vue and Angular?

Yes. Privacy Screen is a Capacitor package, so it works with any web framework that runs inside Capacitor, including Ionic, React, Vue, Angular, Svelte and plain JavaScript.

Which Capacitor version does @capgo/capacitor-privacy-screen support?

Capgo plugins follow Capacitor's major version: use the plugin major version that matches your Capacitor major version (for example plugin v8 with Capacitor 8). The compatibility table in the GitHub README lists the maintained versions.

Is @capgo/capacitor-privacy-screen free and open source?

Yes. The source code is public on GitHub at https://github.com/Cap-go/capacitor-privacy-screen/ and the package is free to install from npm. Bug reports and pull requests are welcome.

Can I update code that uses Privacy Screen without an App Store review?

Installing or upgrading the plugin changes native code, so it needs a new store build. After that, JavaScript, HTML and CSS changes that call the plugin can ship instantly with Capgo live updates.

Ship Privacy Screen changes without waiting for app review

Once the plugin is in your store build, Capgo live updates push your JavaScript, HTML and CSS changes to users in minutes.

Start with Capgo