Inizia
Copia un prompt di configurazione con le istruzioni di installazione e la guida markdown completa per questo plugin.
Set up this Capacitor plugin in the project.
Use the package manager already used by the project.
Install these package(s): `@capgo/capacitor-mock-location-detector`
Run the required Capacitor sync/update step after installation.
Read this markdown guide for the full setup steps: https://raw.githubusercontent.com/Cap-go/website/refs/heads/main/apps/docs/src/content/docs/docs/plugins/mock-location-detector/getting-started.mdx
Use that guide for platform-specific steps, native file edits, permissions, config changes, imports, and usage setup.
If that guide references other docs pages, read them too.
Installare
Sezione intitolata “Installazione”bun add @capgo/capacitor-mock-location-detectorbunx cap syncImporta
Sezione intitolata “Importa”import { MockLocationDetector } from '@capgo/capacitor-mock-location-detector';Flusso Raccomandato
Sezione intitolata “Flusso Raccomandato”const result = await MockLocationDetector.analyze({ requestLocationSample: true, minDetectedChecks: 1,});
if (result.isSimulated) { console.warn('Possible GPS spoofing detected', result.riskScore, result.checks);}Esegui una Verifica
Sezione intitolata “Esegui una Verifica”const mockFlag = await MockLocationDetector.runCheck({ check: 'system_mock_flag',});Monitora Continuamente
Sezione intitolata “Monitora Continuamente”await MockLocationDetector.addListener('locationIntegrityChanged', (event) => { console.log('Integrity changed', event.confidence, event.checks);});
await MockLocationDetector.startMonitoring({ intervalMs: 30000 });Guida gli Utenti alle Impostazioni
Sezione intitolata “Guida gli Utenti alle Impostazioni”Copia negli appunti
await MockLocationDetector.openDeveloperSettings();Impostazione della piattaforma
Sezione intitolata “Impostazione della piattaforma”- iOS: Impostazione iOS
- Android: Fonte di verità
Sezione intitolata “Fonte di verità”
Questa pagina segue le istruzioni del pluginRigenera docgen upstream quando il pubblico __CAPGO_KEEP_0__ cambia. src/definitions.ts. Re-run docgen upstream when the public API changes.