Skip to content

@capgo/capacitor-mock-location-detector

Layered GPS spoofing detection for Capacitor apps on iOS and Android.

@capgo/capacitor-mock-location-detector combines multiple independent checks because no single OS flag reliably detects tools such as PoKeep or iMyFone AnyTo.

  • analyze - Run all available checks and return a scored composite result.
  • runCheck - Execute one named detection layer.
  • getCapabilities - Discover supported checks on the current platform.
  • startMonitoring / stopMonitoring - Periodic analysis with locationIntegrityChanged events.
  • openDeveloperSettings - Open the best-effort settings screen so users can disable developer or mock tooling.
Check IDiOSAndroidPurpose
system_mock_flag✅✅OS mock/simulation flag on the current GPS fix
developer_options—✅Android developer options enabled
developer_mode_indicators✅✅Indirect developer/debug build heuristics
mock_location_app✅✅Known spoof app packages or URL schemes
adb_enabled—✅USB debugging enabled
mock_provider_settings—✅Apps granted legacy mock-location permission
location_anomaly✅✅Impossible movement speed / teleport heuristic
motion_correlation✅—GPS movement without matching accelerometer activity
simulator✅✅Simulator/emulator environment
  • iOS does not expose a public Developer Mode API. The plugin uses App Store-safe heuristics only.
  • Apps cannot programmatically disable Developer Mode or mock location settings.

This reference is synced from src/definitions.ts in capacitor-mock-location-detector.