Skip to content

Geolocation: document iOS 14 reduced accuracy behavior and Android altitude zero-value #3248

@PureWeen

Description

@PureWeen

Summary

The geolocation documentation does not cover two platform-specific behaviors that cause incorrect data in production apps:

  1. iOS 14 reduced accuracy: Users can grant "approximate" location, resulting in accuracy values > 100m. Without calling GeolocationRequest.RequestFullAccuracy, apps receive coarse location data without any indication that the user chose reduced precision.
  2. Android altitude 0.0: Some Android devices return 0.0 for Location.Altitude when the device lacks a barometric sensor. This is indistinguishable from actual sea-level elevation.

Why it matters

iOS 14 reduced accuracy

Apps that assume full-accuracy location (e.g., turn-by-turn navigation, delivery tracking) will silently get ~1km-radius results. The developer sees valid coordinates and non-null results — nothing fails, the data is just imprecise. Without checking location.Accuracy and prompting via RequestFullAccuracy, there is no way to know.

Android altitude 0.0

Apps that use altitude data (hiking, aviation, elevation profiles) will incorrectly show sea level for devices without a barometer. Treating 0.0 as a valid reading is a data integrity bug.

What should be documented

iOS 14 reduced accuracy

iOS 14+: Users can grant "approximate" location instead of precise location. Check location.Accuracy — values greater than 100 meters likely indicate reduced precision. Use GeolocationRequest.RequestFullAccuracy with a matching key from NSLocationTemporaryUsageDescriptionDictionary in Info.plist to prompt the user for full accuracy when needed.

Add to Info.plist setup:

<key>NSLocationTemporaryUsageDescriptionDictionary</key>
<dict>
  <key>FullAccuracyUsageKey</key>
  <string>This app needs precise location for turn-by-turn directions.</string>
</dict>

Android altitude

Android: Some devices return 0.0 for Location.Altitude when the GPS hardware lacks a barometric sensor. Treat 0.0 as "unknown" rather than sea level. Check location.Altitude != 0 before using altitude data.

Suggested location

docs/platform-integration/device/geolocation.md — in a "Platform differences" or "Platform gotchas" section

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions