Skip to content

network

const network: {
getStatus: Promise<NetworkStatus>;
};

Defined in: domains/network.ts:13

getStatus(): Promise<NetworkStatus>;

Get the current network connectivity status.

In the iOS app, returns accurate connection type from the native layer. In the browser, falls back to navigator.onLine — note that this may return true on captive portals even without real internet access.

Promise<NetworkStatus>

A NetworkStatus object with connected and type.

const { connected, type } = await mobilelocker.network.getStatus()
if (!connected) showOfflineBanner()