Privacy shield for Cocoa apps
Apptics' privacy shield prevents the unauthorized capture of sensitive information such as financial information, personal information, private photos, and so on. Once added to the app, the privacy shield will detect the screenshots or screen recording in the app and immediately hide the sensitive content. This helps you to keep your private information, private.
Requirements
- Applicable for apps with iOS 12+ and iPadOS 13+.
Installation
- Edit the podfile to install the required library for Apptics privacy shield.
Copied
Secure the app views
- Wrap the app views in the Secure Views as given in the example below.
Copied
Customize the app view
- Customize the app views as given below.
Copied
Protect entire view
- Protect the entire view using the below code.
Copied
Protect window from screen sharing
- Protect the entire window from screen sharing using the below code.
Copied
Note: APWindowShield will protect the window from screen sharing and recording by adding a customizable message view over your window.
Customize the message view
- Customize the message view as shown in the below example.
Copied
Screenshot monitoring
Start monitoring for screenshots
Use the method below to enable screenshot monitoring. When this method is called, the user will be prompted to temporarily disable the Privacy Shield to allow screenshots. To grant permission, the user should authenticate using either the biometric data (e.g., FaceID or TouchID) or the device password.
Stop monitoring for screenshots
Use the method below to disable the screenshot monitoring. No alerts or prompts will be shown to the user. This method will stop the monitoring functionality.
Enable or disable the privacy shield
The below method will allow you to programmatically enable or disable the screenshot detection and alert feature.
Note: Privacy shield is always active to protect the sensitive data. The below method controls whether screenshot detection and user alerts are enabled.
Use the method below to check whether Apptics privacy shield is currently enabled or disabled. The method will return a boolean value indicating the current status of the privacy shield.
Note: To enable screenshot monitoring and request permission for screenshots, you must include NSFaceIDUsageDescription key-value pair in the app's info.plist file. This is necessary to handle the biometric or password authentication prompt when temporarily disabling privacy shield for screenshots.