メインコンテンツにジャンプします
プラグインに戻る
@capgo/capacitor-mock-location-detector
チュートリアル
@capgo/capacitor-mock-location-detector

モックロケーションデータ

シミュレートされたGPSの位置と、開発者ツールを有効にするアプリを検出します

ガイド

モックロケーションデータを検出するチュートリアル

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