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_flagOS mock/simulation flag on the current GPS fix
developer_optionsAndroid developer options enabled
developer_mode_indicatorsIndirect developer/debug build heuristics
mock_location_appKnown spoof app packages or URL schemes
adb_enabledUSB debugging enabled
mock_provider_settingsApps granted legacy mock-location permission
location_anomalyImpossible movement speed / teleport heuristic
motion_correlationGPS movement without matching accelerometer activity
simulatorSimulator/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.