Appearance
Function: isNativeHost()
isNativeHost(
mode):boolean
Is this host a NATIVE shell rather than a browser?
env.mode names the platform (WEB, IOS, MACOS, WINDOWS, ANDROID). Only the browser builds (Impact web, Admin) ever say WEB; every other value is a shell that answers getEnv over a JS bridge and keeps an offline mirror. The distinction most platform branches actually want is "bridge + offline mirror or plain HTTP", NOT "iPad" — for years there was only one native host, so the two were spelled the same (mode === 'IOS').
Backward and forward compatible by construction: the check is mode !== 'WEB', not a lookup in a closed list. An SDK or Slotty bundle built today keeps treating a host it has never heard of (a future LINUX, say) as native, so a new host never needs a lockstep web deploy to keep its offline paths, and an old host reporting IOS is unchanged.
Use this wherever the branch means "the host answers this over its bridge / has local files / has no on-demand fetch". Keep a literal mode === 'IOS' ONLY for iPad HARDWARE — Multipeer peer session, the Salesforce Mobile SDK's SmartStore, on-device inference — which no other host implements and which answer requestTypeDoesNotExists there.
Parameters
| Parameter | Type |
|---|---|
mode | string | null | undefined |
Returns
boolean
