안내
Mock 위치 감지기 튜토리얼
Using @capgo/capacitor-mock-location-detector
실제 GPS 위치를 모방하여-layered, App Store-safe 체크를 iOS 및 Android에서 사용합니다.
설치
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/