Bridge Overview
How the native bridge works
What is the Bridge?
The Unveily Bridge is the communication interface between web (JavaScript) ↔ native.
From your web page, you can call native features like camera, GPS, and biometric auth via window.unveilyBridge, and receive results through callbacks. You can use the built-in features without writing any Swift or Kotlin, and you can also extend it directly in Kotlin or Swift when you want to.
The only injected global is the lowercase window.unveilyBridge. (There is no capitalized window.UnveilyBridge.)
Basic Structure
Most async methods take a callback function name as a string. Native calls the global function of that name that you define on window, and the result is delivered as a single JSON object argument.
// Web → Native: call a feature (pass the callback name as a string)
window.unveilyBridge.qr.scan("onQRResult");
// The result is delivered to your global callback (a single JSON object argument)
function onQRResult(result) {
const { text, format, type } = result;
console.log("Scan result:", text); // decoded value
console.log("Format:", format); // e.g. "QR_CODE", "EAN_13"
}To send an event from native to web, native invokes a named global callback function. There is no generic unveily-event CustomEvent. Define the global functions you need, like below.
// Native → Web: native invokes named global functions
window.onFCMReceived = function (title, body, dataJson) {
// push notification received
};
window.onDeepLinkReceived = function (url) {
// deep link received
};
window.onPaymentResult = function (success, message) {
// payment result received
};Readiness — unveilyGlueReady
window.unveilyBridge is registered before page load, but some namespaces (such as the navigation modules) are only created after the glue script is injected. In SPAs like React or Vue, if you call namespaced methods at mount time, wait for the unveilyGlueReady event first.
window.addEventListener('unveilyGlueReady', () => {
window.unveilyBridge.bottomTabs.setConfig({ items: [/* ... */] });
}, { once: true });User-gesture calls don't need to wait
When you call the bridge from a user action such as a button click, you don't need to wait for unveilyGlueReady — the glue is always ready by then.
Plan / Module Checks
Read the current license plan via app.getInfo(). (There is no window.unveilyBridge.plan or hasFeature() API.)
// Check the current license tier
window.unveilyBridge.app.getInfo("onAppInfo");
function onAppInfo(info) {
console.log(info.tier); // "basic" | "standard" | "pro"
console.log(info.platform); // "android" | "ios"
if (info.tier !== "basic") {
showBiometricButton(); // biometric auth is Standard and above
}
}Check whether a navigation module (bottomTabs, sideDrawer, topDownMenu, accessibility) is enabled via the synchronous modules.isEnabled().
// Check module availability (synchronous boolean)
if (window.unveilyBridge.modules.isEnabled("sideDrawer")) {
// sideDrawer is available
}
// List of enabled modules (array)
const enabled = window.unveilyBridge.modules.getEnabledModules();Full Feature List
Basic and Above
| Feature | Docs |
|---|---|
| QR / Barcode scan | qr-scan |
| Push notifications (FCM) | push-notifications |
| Camera / Gallery | camera-gallery |
| Location (GPS) | location |
| Deep links | deeplink |
| Offline mode | offline-mode |
| Data storage | storage |
| App info | app-info |
| Social login (Google, Apple) | social-login-bridge |
| Navigation UI (bottom tabs, top menu, bottom sheet) | navigation |
| Accessibility (panel, TTS/STT/Haptic) | accessibility |
Standard and Above
| Feature | Docs |
|---|---|
| Biometric auth | biometric |
| Side Drawer | navigation |
| Social login (Kakao / Naver / Line) | social-login-bridge |
Pro
| Feature | Docs |
|---|---|
| In-app purchases (Google Play & App Store) | iap |
| Social login (Meta) | social-login-bridge |
Platform Support Status
Both Android and iOS are supported at full feature parity. The iOS glue mirrors the Android JS API exactly, so the same code runs on both platforms.
| Platform | Status |
|---|---|
| Android 7.0+ (API 24+) | ✓ Supported |
| iOS | ✓ Supported |