The bridge requires minimal configuration. In most cases, auto-detection handles everything.Documentation Index
Fetch the complete documentation index at: https://docs.go.gbgplc.com/llms.txt
Use this file to discover all available pages before exploring further.
Bridge options
Options are passed toNativeBridge.getInstance() (or to <BridgeProvider options={...}> in React).
environment
Override automatic environment detection. Useful for testing or debugging.
channel
Inject a custom MessageChannel implementation for testing.
iframeAllowedOrigins
An allowlist of origins for incoming postMessage events. Only applies to iframe transport.
iframeTargetOrigin
The target origin for outgoing postMessage calls. Only applies to iframe transport.
window.location.origin. Set this explicitly when the parent frame is on a different origin.
Timeouts
| Operation | Default timeout | Configurable? |
|---|---|---|
discoverCapabilities() | 5,000 ms | Yes (parameter) |
request() | 30,000 ms | Yes (via RequestOptions.timeout) |
useNativeCamera().requestCapture() | 120,000 ms | No (hardcoded) |
React configuration
Pass options to<BridgeProvider>:
discoverOnMount prop controls whether discoverCapabilities() runs automatically:
| Value | Behaviour |
|---|---|
true (default) | Discovery runs on mount. capabilitiesReady becomes true when complete. |
false | Discovery is skipped. capabilitiesReady is true immediately with empty capabilities. |