跳过内容

iOS 行为

iOS 保护机制

iOS 保护机制

在 iOS 上,插件在应用程序重新激活时添加一个临时本机覆盖。该覆盖是显示在应用程序 switcher 快照中的,而不是您的真实界面。

这意味着插件保护:

  • 应用程序 switcher 预览
  • iOS 保持应用程序背景时的快照

iOS does not offer the same screenshot blocking API as Android. The plugin cannot prevent a user from taking a screenshot while actively using the app.

如果您需要在 iOS 上实现更强大的政策控制,请将此插件与应用级别的选择(例如:

  • 在呈现 UI 时,特别是对敏感 UI 进行掩码
  • 在屏幕上最小化敏感数据的保留
  • 在应用后台时清除临时值

安装后不需要额外的 iOS 配置 cap sync.

import { PrivacyScreen } from '@capgo/capacitor-privacy-screen';
await PrivacyScreen.enable();

对于大多数应用来说,即使有明确的调用也是可选的,因为插件默认启用