가이드
Mock 위치 감지기 튜토리얼
Using @capgo/capacitor-mock-location-detector
설치
이 플러그인으로 노출되는 것
bun add @capgo/capacitor-mock-location-detector
bunx cap sync
- 모든 체크를 실행하고 점수화 된 합성 결과를 반환합니다.
analyze- 하나의 이름이 지정된 감지 레이어를 실행합니다.runCheck설치getCapabilities- 현재 플랫폼에서 지원하는 체크를 발견하세요.startMonitoring/stopMonitoring- 이벤트와 함께 주기적인 분석.openDeveloperSettings- 개발자 또는 모의 툴링을 비활성화하는 사용자 안내.
예시 사용법
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();
전체 참조
- GitHub https://github.com/Cap-go/capacitor-mock-location-detector/
- 문서: /docs/plugins/mock-location-detector/