Zum Hauptinhalt springen
Zurück zu Plugins
@capgo/capacitor-Mock-Locationsimulator
Anleitung
@capgo/capacitor-Mock-Locationsimulator

Mock-Locationsimulator

Simulierte GPS-Ortungen und Entwicklerwerkzeuge, die Apps zum Fälschen ermöglichen

Ansehen auf __CAPGO_KEEP_0__

Anleitung

Using @capgo/capacitor-mock-location-detector

Verwendung von @__CAPGO_KEEP_0__/__CAPGO_KEEP_1__-mock-location-detector

Simulierte GPS-Locations mithilfe layerter, App-Store-sicherer Prüfungen auf iOS und Android erkennen.

bun add @capgo/capacitor-mock-location-detector
bunx cap sync

Installieren

  • analyze Was dieses Plugin bereitstellt
  • runCheck - Alle verfügbaren Prüfungen ausführen und ein bewerteter kombiniertes Ergebnis zurückgeben.
  • getCapabilities - Entdecken Sie unterstützte Prüfungen auf der aktuellen Plattform.
  • startMonitoring / stopMonitoring - Periodische Analyse mit Ereignissen.
  • openDeveloperSettings - Leiten Sie Benutzer an, die Entwickler- oder Mock-Tooling zu deaktivieren.

- Beispielverwendung

import { MockLocationDetector } from '@capgo/capacitor-mock-location-detector';

const result = await MockLocationDetector.analyze({
  requestLocationSample: true,
  minDetectedChecks: 1,
});

if (result.isSimulated) {
  console.warn('Possible GPS spoofing detected', result.checks);
}

await MockLocationDetector.openDeveloperSettings();

- Vollständige Referenz