Richtlinie
Tutorial zum Mock Location Detector
Mit @capgo/capacitor-mock-location-detector verwenden
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 enthält
analyze- Alle verfügbaren Überprüfungen ausführen und ein bewerteter Gesamtergebnis zurückgeben.runCheck- Eine benannte Erkennungsschicht ausführen.getCapabilities- Unterstützte Überprüfungen auf der aktuellen Plattform entdecken.startMonitoring/stopMonitoring- Periodische Analyse mit Ereignissen.openDeveloperSettings- Leiten Sie Benutzer an, Entwickler- oder Mock-Tooling zu deaktivieren.
Beispielhafte 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-location-detector/
- Dokumentation: /docs/plugins/mock-location-detector/