SwiftUI has a SecureField
text field which doesn't show anything typed into it when viewed from screen recordings or screenshots. Similarly, iOS 15 is going to have a .privacySensitive()
modifier that removes the View from widgets and such. Does anyone have any idea on how to implement Views like this? I want a View which blurs itself when it's contained in screen recordings, screenshots, app widgets, multitasking menu (so they can't cheat the system) etc.
Any suggestions on how to achieve this effect would be greatly appreciated.
Thanks in advance!
Edit: You can tell if someone has opened the multitasking menu by subscribing to NotifcationCenter.default.publisher(for: UIApplication.willResignActive, perform: { _ in })
. However I still haven't been able to figure out the others
Edit 2: I also found that subscribing to UIScreen.capturedDidChangeNotification
tells you if screen recording is active. Still stuck on screenshots and widgets