Anleitung
Mock Location Detector in Capacitor nutzen
Verwendung von @capgo/capacitor-mock-location-detector
Simulierte GPS-Standorte durch mehrstufige, App Store-konforme Checks auf iOS und Android erkennen.
Installieren
bun add @capgo/capacitor-mock-location-detector
bunx cap sync
Was dieses Plugin bereitstellt
analyze- Führt alle verfügbaren Checks aus und gibt ein gewichtetes Gesamtergebnis zurück.runCheck- Führt eine spezifische Detection Layer aus.getCapabilities- Findet auf der aktuellen Plattform unterstützte Checks.startMonitoring/stopMonitoring- Periodische Analyse mit Events.openDeveloperSettings- Leitet Nutzer an, Developer- oder Mock-Tools zu deaktivieren.
Anwendungsbeispiel
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/
- Docs: /docs/plugins/mock-location-detector/