The class in which we check when the user makes a recording or screenshot.
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
ScreenCaputreGuard.shared.startPreventing()
return true
}
We prohibit the capture and recording of our screen:
ScreenCaputreGuard.shared.startPreventing()
Allow the capture and recording of our screen:
ScreenCaputreGuard.shared.stopPreventing()