Skip to content

시작하기

GitHub
터미널 창
bun add @capgo/capacitor-mock-location-detector
bunx cap sync
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();

플랫폼 설정

플랫폼 설정

. __CAPGO_KEEP_0__이 공개되면 다시 upstream docgen을 실행하십시오. src/definitions.ts. Re-run docgen upstream when the public API changes.