Radical
Reference

Data protection API

Native capture protection and local web data deletion.

Native enablement is internalPlugins.dataProtection. Radical supplies the native implementation without an extra capability package.

setDataProtection(enabled) returns an Effect of DataProtectionStatus requiring Bridge. DataProtectionStatusSchema validates four booleans: enabled, screenshots, recording, and appSwitcher.

RuntimeProtection
AndroidSecure-window protection blocks screenshots and recording and protects the app switcher.
iOSObscures active capture and the app switcher. Cannot block screenshots.
BrowserReturns all fields false. Does not protect the screen.

Protection persists until explicitly disabled, including after hook unmount. Status reports supported behavior; it does not prove that no capture occurred.

clearWebData

clearWebData is an Effect of void requiring Bridge | BrowserDataProtection.

Deletion phaseScope
Browser firstPause snapshot writes; unregister workers; delete Cache Storage and enumerated IndexedDB databases; clear local and session storage; expire accessible cookies
Native nextNative WebView data, including data inaccessible to browser JavaScript
Browser limitsHttpOnly cookies inaccessible; database enumeration requires indexedDB.databases

Clearing requires closed IndexedDB connections and can fail after partial deletion. It neither reloads the document nor stops application writes.

dataProtectionLive(effect) provides BrowserDataProtectionLive. BrowserDataProtection exposes the injectable clear operation.

ErrorMeaning
BridgeErrorIncludes BridgeDecodeError for invalid enabled values
WebDataClearFailedClearing failed; carries cause

useDataProtection() exposes setEnabled(enabled) and clearWebData() with action state. Its value is the protection status or true after successful clearing.

Source: data protection implementation.

On this page