Anleitung
Verwenden Sie Mock Location Detector in Capacitor
Mit @capgo/capacitor-Mock-Locations-Detektor
Simulierte GPS-Locations erkennen, indem auf iOS und Android mit layerierten, App-Store-sicheren Prüfungen gearbeitet wird.
Installieren
bun add @capgo/capacitor-mock-location-detector
bunx cap sync
Was dieses Plugin bereitstellt
analyze- Alle verfügbaren Prüfungen ausführen und ein bewerteter Gesamtergebnis zurückgeben.runCheck- Eine benannte Erkundungsschicht ausführen.getCapabilities- Unterstützte Prüfungen auf der aktuellen Plattform entdecken.startMonitoring/stopMonitoring- Periodische Analyse mit Ereignissen.openDeveloperSettings- Benutzer zu den Deaktivierung von Entwickler- oder Mock-Tools leiten.
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
- GitHub: https://github.com/Cap-go/capacitor-Mock-Locations-Detektor/
- Dokumentation: /docs/plugins/mock-location-detector/