ガイド
モックロケーションデータを検出するチュートリアル
Using @capgo/capacitor-mock-location-detector
インストール
このプラグインが公開するもの
bun add @capgo/capacitor-mock-location-detector
bunx cap sync
- 使用可能なすべてのチェックを実行し、スコア付きの合成結果を返します。
analyze- 1 つの名前付き検出レイヤーを実行します。runCheck__CAPGO_KEEP_0__は__CAPGO_KEEP_1__-mock-location-detectorモジュールを使用しますgetCapabilities- {targetLanguage}でサポートされているチェックを現在のプラットフォームで発見します。startMonitoring/stopMonitoring- イベントとともに定期的な分析を行います。openDeveloperSettings- 開発者またはモックツールの使用をユーザーに非推奨にします。
Example Usage
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();
Full Reference
- GitHub https://github.com/Cap-go/capacitor-mock-location-detector/
- ドキュメント: /docs/plugins/mock-location-detector/