On the open web, a page calls navigator.geolocation.getCurrentPosition() and gets a coordinate — used for store finders, fraud checks, and localized content. Inside a WebView, the same call silently fails. On Android the Geolocation API is disabled by default and only works if the host wires a callback, grants a runtime permission, and serves the page over HTTPS. On iOS every request is routed through a WKUIDelegate method the app must implement. A host-owned runtime bridges native location — one call that resolves to the device GPS on every engine.

Android: geolocation is off until the host turns it on

Android's WebSettings.setGeolocationEnabled() defaults to false. Enabling it is only the first of four requirements: the app must hold ACCESS_FINE_LOCATION / ACCESS_COARSE_LOCATION, it must implement WebChromeClient.onGeolocationPermissionsShowPrompt() and call callback.invoke(origin, true, false), it must request the dangerous permission at runtime on Android 6.0+, and the page must be served over HTTPS (or localhost). Miss any one and getCurrentPosition() returns PERMISSION_DENIED — or, worse, fails with no callback at all. Vendor ROMs (EMUI, MIUI) add background-location restrictions that can leave the WebView unable to obtain a service handle even after permission is granted.

iOS: every request goes through the app

In WKWebView, geolocation is delegated entirely to the app via WKUIDelegate.webView(_:requestGeolocationPermissionFor:initiatedByFrame:decisionHandler:). If the app never implements that method, the request simply dies — no prompt, no fix. Apple also requires NSLocationWhenInUseUsageDescription (and the Always variant if needed) in Info.plist, and the app should request native authorization through CLLocationManager before the web content asks. A page that calls geolocation on load, or without a direct user gesture, is blocked or re-prompted. Without a button-triggered flow, users see confusing duplicate prompts or a silent failure.

What breaks when position is lost

  • KYC location verification fails. Broker and exchange onboarding that proves "the user is in an allowed jurisdiction" cannot read a coordinate, so compliant onboarding stalls.
  • Branch, ATM, and agent finders go dark. "Find the nearest office" returns nothing because the page never gets a fix.
  • Geofenced compliance breaks. Region-locked products and marketing consent rules that depend on location silently misfire.
  • Fraud signals weaken. Location is a key risk signal; losing it pushes more legitimate users into false declines.

The runtime fix

A host-owned runtime bridges the location layer. The page calls one uniform API — runtime.getLocation(options) — and the host resolves it through the platform-native provider: FusedLocationProvider / LocationManager on Android, CLLocationManager on iOS. Permission, accuracy, and timeout are handled natively and returned as a coordinate the page can trust. One integration, every engine, a real position at the end of it.

DimensionWebViewHost-owned runtime
Android defaultGeolocation API off (setGeolocationEnabled=false)Native provider, always on
Permission flowHost callback + runtime grant + HTTPSOne runtime.getLocation()
iOS pathWKUIDelegate method, or it diesNative CLLocationManager
Failure modeSilent PERMISSION_DENIED / no callbackExplicit, observable error
KYC / geofenceBreaksWorks
ConsistencyPer-engineUniform

A native app reads the device GPS on every device. A stock WebView reads it on almost none. A runtime gives the page one location call — and a coordinate it can act on.

Sources