Anleitung
Mock Location Detector in Capacitor verwenden
@capgo/capacitor-mock-location-detector nutzen
Simulierte GPS-Standorte mit mehrstufigen, App-Store-konformen Prüfungen 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 benannte Detection-Schicht aus.getCapabilities- Entdeckt unterstützte Checks auf der aktuellen Plattform.startMonitoring/stopMonitoring- Periodische Analyse mit Events.openDeveloperSettings- Leitet Nutzer an, Entwickler- 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/
- Doku: /docs/plugins/mock-location-detector/