capacitor-community / privacy-screen

⚡️ Capacitor plugin that protects your app from displaying a screenshot in Recents screen/App Switcher.
MIT License
87 stars 23 forks source link

feat(iOS): possibility to enable/disable screenshots without disabling privacy screen when app is put in background #104

Closed nomadminded closed 3 months ago

nomadminded commented 3 months ago

Is your feature request related to a problem? Please describe: Currently, if privacy screen is enabled, on iOS both background privacy screen when putting app in background and possibility to take screenshots are disabled. It could be useful to be able to separate the behavior (Cordova plugin allowed taking screenshots on iOS and only showed privacy screen image when app was put in background, so this could be useful for seamless migration from Cordova to Capacitor).

Describe the solution you'd like: Adding another key to config, "disableScreenshot" which defaults to true to be backwards compatible, will provide the possibility to set said key to false and only have the privacy screen option without taking away the possibility of taking screenshots.

nomadminded commented 3 months ago

Created PR #105