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: Custom Image for Screenshot #99

Closed ZhipengZeng closed 4 months ago

ZhipengZeng commented 4 months ago

Is your feature request related to a problem? Please describe:

A self defined image for switch app screen is well done. But for screenshot it uses a black screen instead, which is kind of not that user friendly.

Describe the solution you'd like:

A separate custom image(optional) for screenshot defined in capacitor.config.ts

PrivacyScreen: { enable: true, imageName: "Splash", screenshotImageName: "CustomScreenshotImage" }

robingenz commented 4 months ago

I suggest we use the imageName option for both. Feel free to create a PR.

ZhipengZeng commented 4 months ago

I did some research and it seems we don't have many options to implement screenshot blocker for iOS. The UITextField isSecureTextEntry approach is the only effective one.

robingenz commented 4 months ago

You're right. I totally forgot that. Since there is no other solution, I close this issue as not planned.