내용으로 건너뛰기

Getting Started

GitHub

설치

설치
터미널 창
bun add @capgo/capacitor-mock-location-detector
bunx cap sync

import

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

이 페이지는 플러그인의 src/definitions.ts API이 공개되면 다시 upstream docgen을 실행하십시오.