App Info
Access app version, device info, and the current subscription plan
Overview
The App Bridge provides information about the current runtime environment (platform, version, locale, subscription plan, and more) along with a device identifier. Use it for server-side log collection, version-based feature branching, and plan-based UI control. Android and iOS use the same JS API.
| Feature | Android | iOS |
|---|---|---|
App info (app.getInfo) | ✓ | ✓ |
Device ID (getDeviceId) | ✓ | ✓ |
App version (getAppVersion) | ✓ | ✓ |
Security policy (app.getSecurityPolicy) | ✓ | ✓ |
app.getInfo
The canonical method for reading everything about the current runtime environment in one call. Pass the name of a callback function (a string); that window function is invoked with an info object. This is the canonical way to read the current subscription plan and active features.
window.unveilyBridge.app.getInfo("onAppInfo");
function onAppInfo(info) {
console.log(info.tier); // "basic" | "standard" | "pro"
console.log(info.platform); // "android" | "ios"
console.log(info.appVersion); // "1.2.0"
console.log(info.isOffline); // boolean
}Info object fields
| Field | Type | Description |
|---|---|---|
isApp | boolean | Whether running inside the SDK app (false in a regular browser) |
platform | string | "android" | "ios" |
appVersion | string | App version name (e.g. "1.2.0") |
buildNumber | string | Build number |
packageName | string | Android package name / iOS Bundle ID |
locale | string | Current locale (e.g. "ko") |
tier | string | Subscription plan — "basic" | "standard" | "pro" |
licenseType | string | License type |
isOffline | boolean | Whether offline mode is active |
isTablet | boolean | Whether the device is a tablet |
orientation | string | "portrait" | "landscape" |
licenseKey is never exposed
For security, the license key (licenseKey) is intentionally omitted from this response. Client code cannot access the license key. To branch your UI by plan, use the tier field.
If you omit the callback name, the default onAppInfo is used. That is, you may call window.unveilyBridge.app.getInfo() and define a window.onAppInfo function.
Example — Branching features by plan
window.unveilyBridge.app.getInfo("onAppInfo");
function onAppInfo(info) {
if (info.tier === "pro") {
enableInAppPurchase();
} else {
showUpgradePrompt();
}
}getDeviceId
Returns a unique identifier for the app installation synchronously.
const id = window.unveilyBridge.getDeviceId();
console.log("Device ID:", id);The value returned by getDeviceId() is a unique identifier per app installation. It is different from the Advertising ID (GAID/IDFA) and is not personally identifiable information.
getAppVersion
Returns the version string of the currently installed app synchronously.
const version = window.unveilyBridge.getAppVersion();
console.log("App version:", version); // e.g. "1.2.0"If you also need the build number, use the buildNumber field of app.getInfo.
Other app namespace methods
app.isTablet
Returns whether the device is a tablet synchronously. Use it for layout branching.
const isTablet = window.unveilyBridge.app.isTablet(); // booleanapp.orientation
Returns the current screen orientation synchronously.
const orientation = window.unveilyBridge.app.orientation(); // "portrait" | "landscape"app.setLocale
Overrides the SDK-managed locale (used for menu labels and the like). Call it when the user changes the language in your app.
window.unveilyBridge.app.setLocale("ko"); // "ko" | "en" | "ja" | BCP-47
window.unveilyBridge.app.setLocale(""); // reset to device localeapp.openExternalUrl
Opens an http(s) URL in the device's default browser — navigating to an external browser rather than inside the WebView. Schemes other than http/https are ignored.
window.unveilyBridge.app.openExternalUrl("https://example.com");
// The top-level alias behaves identically
window.unveilyBridge.openExternalUrl("https://example.com");app.openSettings
Opens the app's system settings screen. Use it to guide the user to change permissions (location, camera, etc.) themselves.
window.unveilyBridge.app.openSettings();app.getSecurityPolicy
Reads the currently applied security policy (read-only). Pass the name of a callback function (a string); it receives a policy object.
window.unveilyBridge.app.getSecurityPolicy("onSecurityPolicyLoaded");
function onSecurityPolicyLoaded(policy) {
console.log(policy.screenshotProtection); // screenshot protection
console.log(policy.backgroundProtection); // background screen protection
console.log(policy.rootDetection); // root/jailbreak detection
}| Field | Description |
|---|---|
screenshotProtection | Whether screenshot/screen-recording protection is active |
backgroundProtection | Whether screen content is masked in the app switcher |
rootDetection | Whether root (Android) / jailbreak (iOS) detection is active |
If you omit the callback name, the default onSecurityPolicyLoaded is used.