Mulai
Copy prompt pengaturan dengan langkah instalasi dan panduan markdown lengkap untuk plugin ini.
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.
Instal
Bab berjudul “Instal”bun add @capgo/capacitor-mock-location-detectorbunx cap syncImpor
Bab berjudul “Impor”import { MockLocationDetector } from '@capgo/capacitor-mock-location-detector';Alur yang Dianjurkan
Judul Bagian “Alur yang Dianjurkan”const result = await MockLocationDetector.analyze({ requestLocationSample: true, minDetectedChecks: 1,});
if (result.isSimulated) { console.warn('Possible GPS spoofing detected', result.riskScore, result.checks);}Lakukan Cek Satu
Judul Bagian “Lakukan Cek Satu”const mockFlag = await MockLocationDetector.runCheck({ check: 'system_mock_flag',});Monitor Terus-Menerus
Judul Bagian “Monitor Terus-Menerus”await MockLocationDetector.addListener('locationIntegrityChanged', (event) => { console.log('Integrity changed', event.confidence, event.checks);});
await MockLocationDetector.startMonitoring({ intervalMs: 30000 });Pandu Pengguna ke Pengaturan
Judul Bagian “Pandu Pengguna ke Pengaturan”Aplikasi tidak dapat menonaktifkan mode pengembang atau lokasi palsu secara otomatis. Buka pengaturan saja:
await MockLocationDetector.openDeveloperSettings();Pengaturan Platform
Bab berjudul “Pengaturan Platform”- IOS: Pengaturan iOS
- Android: Pengaturan Android
Sumber Kebenaran
Bab berjudul “Sumber Kebenaran”Halaman ini mengikuti plugin’s src/definitions.ts. Re-run docgen upstream ketika API publik berubah.