Skip to main content
Unveilydocs

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.

FeatureAndroidiOS
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

FieldTypeDescription
isAppbooleanWhether running inside the SDK app (false in a regular browser)
platformstring"android" | "ios"
appVersionstringApp version name (e.g. "1.2.0")
buildNumberstringBuild number
packageNamestringAndroid package name / iOS Bundle ID
localestringCurrent locale (e.g. "ko")
tierstringSubscription plan — "basic" | "standard" | "pro"
licenseTypestringLicense type
isOfflinebooleanWhether offline mode is active
isTabletbooleanWhether the device is a tablet
orientationstring"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();  // boolean

app.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 locale

app.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
}
FieldDescription
screenshotProtectionWhether screenshot/screen-recording protection is active
backgroundProtectionWhether screen content is masked in the app switcher
rootDetectionWhether root (Android) / jailbreak (iOS) detection is active

If you omit the callback name, the default onSecurityPolicyLoaded is used.

On this page