시작하기
이 플러그인의 설치 단계와 전체 마크다운 가이드를 포함한 설정 명령어를 복사하세요
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.
설치
설치 제목bun add @capgo/capacitor-mock-location-detectorbunx cap syncImport
Import 제목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.riskScore, result.checks);}한 번만 체크
한 번만 체크 섹션const mockFlag = await MockLocationDetector.runCheck({ check: 'system_mock_flag',});계속 모니터링
계속 모니터링 섹션await MockLocationDetector.addListener('locationIntegrityChanged', (event) => { console.log('Integrity changed', event.confidence, event.checks);});
await MockLocationDetector.startMonitoring({ intervalMs: 30000 });사용자에게 설정으로 안내
설정으로 안내하는 섹션앱은 개발자 모드나 가짜 위치를 자동으로 비활성화할 수 없습니다. 설정을 열어보세요.
await MockLocationDetector.openDeveloperSettings();플랫폼 설정
플랫폼 설정- iOS: iOS 설정
- Android: Android 설정
진실의 근원
플러그인에 따라 이 페이지는공개 __CAPGO_KEEP_0__이 변경될 때마다 다시 upstream docgen을 실행하세요. src/definitions.ts. Re-run docgen upstream when the public API changes.