Getting Started
このプラグインのインストール手順とマークダウンガイドを含むセットアッププロンプトをコピーします。
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.
インストール
「インストール」のセクションAI-Assisted セットアップを使用してプラグインをインストールできます。AI ツールに Capgo スキルを追加するには、以下のコマンドを実行してください。
npx 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-privacy-screen` plugin in my project.Manual Setupを使用する場合は、以下のコマンドを実行して、下記のプラットフォーム固有の指示に従ってください:
-
プラグインをインストール
ターミナル画面 bun add @capgo/capacitor-privacy-screen -
ネイティブプラットフォームを同期
ターミナル画面 bunx cap sync -
プラットフォームの動作を確認
- 「{__CAPGO_KEEP_0__}スタイルガイド」を参照してください。 iOSの注意事項 アプリSwitcherの動作について。
- Capgoの スタイルガイドを参照してください。 Androidの注意事項
スクリーンショットとレコーディングの動作について。
デフォルトの動作デフォルトの動作
- プラグインは、ネイティブ実装が読み込まれるときに自動的にプライバシー保護を有効にします。
- Androidでは、安全モードはスクリーンショット、スクリーンレコーディングのキャプチャ、そして最近のアプリのプレビューをブロックします。
- On Web, the plugin keeps an in-memory enabled flag only for API parity.
Webでは、プラグインは__CAPGO_KEEP_0__のパリティのために、メモリ内に有効なフラグを保持します。
基本的な使用方法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().
続けて「Getting Started」から進みます
続けて「Getting Started」から進みますCapgoを使用している場合 はじめに セキュリティと法的合致を計画するには Capacitor-privacy-screen@capgo/capacitorを接続します Capacitor-privacy-screen@capgo/capacitorのネイティブ機能 暗号化 暗号化の実装詳細 法的合致 法的合致の実装詳細 Capgo Security Scanner for the product workflow in Capgo Security Scanner, and Capgo Security Capgo製品のワークフローにおけるCapgo セキュリティ。