Richtlinie
Tutorial zum Mock Location Detector
Verwenden Sie @capgo/capacitor-mock-location-detector
Simulierte GPS-Locations mithilfe layerter, App Store-sicherer Überprüfungen auf iOS und Android erkennen.
Installieren
bun add @capgo/capacitor-mock-location-detector
bunx cap sync
Was diese Erweiterung offenlegt
analyze- Alle verfügbaren Überprüfungen ausführen und ein bewertetes Gesamtergebnis zurückgeben.runCheck- Eine benannte Erkennungsschicht ausführen.getCapabilities- Entdecken Sie unterstützte Prüfungen auf der aktuellen Plattform.startMonitoring/stopMonitoring- Periodische Analyse mit Ereignissen.openDeveloperSettings- Leiten Sie Benutzer dazu an, Entwickler- oder Mock-Tooling zu deaktivieren.
Beispiel zur Verwendung
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
- GitHub: https://github.com/Cap-go/capacitor-Mock-Ortungs-Detektor/
- Dokumentation: /docs/plugins/mock-location-detector/