contentCaptureProtected(_:)
Marks the view as a view that activates content protection during scene capture events, such as screenshots, screen recordings, screensharing, etc.
Declaration
nonisolated func contentCaptureProtected(_ isActive: Bool = true) -> some CompositorContent
Parameters
- isActive:
A Boolean value that specifies whether this view is protected when present on screen during scene capture.
Discussion
The contentCaptureProtected modifier requires the App-Protected Content entitlement. For more information on how to apply for this entitlement, see Building spatial experiences for business apps with enterprise APIs for visionOS.
On visionOS, the system redacts the entire screen when a view marked with this modifier is present on screen, scene capture is active, and the app has the App Protected Content entitlement.