ガイド
Mock Location Detectorのチュートリアル
Using @capgo/capacitor-mock-location-detector
シミュレートされたGPS位置を検出する
インストール
bun add @capgo/capacitor-mock-location-detector
bunx cap sync
このプラグインが提供するもの
analyze- すべてのチェックを実行し、スコア付きの合成結果を返します。runCheck- 1 つの名前付き検出レイヤーを実行します。getCapabilities- __CAPGO_KEEP_0__でサポートされているチェックを現在のプラットフォームで発見します。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/