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);
}

__CAPGO_KEEP_1__

__CAPGO_KEEP_2__
const mockFlag = await MockLocationDetector.runCheck({
check: 'system_mock_flag',
});

__CAPGO_KEEP_3__

__CAPGO_KEEP_4__
await MockLocationDetector.addListener('locationIntegrityChanged', (event) => {
console.log('Integrity changed', event.confidence, event.checks);
});
await MockLocationDetector.startMonitoring({ intervalMs: 30000 });

__CAPGO_KEEP_5__

__CAPGO_KEEP_6__

__CAPGO_KEEP_7__

await MockLocationDetector.openDeveloperSettings();

이 페이지는 플러그인의 src/definitions.tsAPI이 공개적으로 변경될 때 다시 upstream docgen을 실행합니다.