Anleitung
Tutorial zum Mock Location Detector
Verwendung von @capgo/capacitor-mock-location-detector
Simulierte GPS-Locations erkennen, indem Sie auf iOS und Android mit mehrschichtigen, im App Store sicheren Prüfungen arbeiten.
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- Entdecken Sie unterstützte Prüfungen auf der aktuellen Plattform.startMonitoring/stopMonitoring- Periodische Analyse mit Ereignissen.openDeveloperSettings- Leiten Sie Benutzer an, Entwickler- oder Mock-Tooling zu deaktivieren.
- 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-Ortungs-Detektor/
- Docs: /docs/plugins/mock-location-detector/