Files
eranos/android
Alex Gleason 2418d6af2f Add native SandboxPlugin for iOS and Android
SandboxFrame now detects Capacitor.isNativePlatform() and branches:

- Web: unchanged iframe.diy postMessage protocol
- Native: creates a WKWebView (iOS) or WebView (Android) overlay with
  a custom URL scheme handler that intercepts all requests and routes
  them through the same resolveFile/onRpc/injectedScripts/csp props

The consumers (Webxdc, NsitePreviewDialog) require no changes.

iOS plugin uses WKURLSchemeHandler (sbx-<id>://) for origin isolation
and WKScriptMessageHandler for bidirectional message passing.

Android plugin uses shouldInterceptRequest with a blocking CountDownLatch
pattern and addJavascriptInterface for the bridge.

Both plugins overlay the native WebView on top of Capacitor's WebView,
positioned via a placeholder div with ResizeObserver tracking.
2026-04-08 17:19:16 -05:00
..
2026-02-19 07:58:45 -06:00
2026-02-19 06:18:02 -06:00