メインコンテンツへスキップ

iOSのセットアップ

GitHub
  • iOS 15以降が必要 CLLocationSourceInformation.isSimulatedBySoftware
  • ホストアプリの位置情報権限
  • 正確なGPSサンプリングには実機を推奨
<key>NSLocationWhenInUseUsageDescription</key>
<string>We verify your location has not been spoofed.</string>

検知対象とする、併用される偽装アプリのオプションURLスキーム canOpenURL:

<key>LSApplicationQueriesSchemes</key>
<array>
<string>anyto</string>
<string>imyfone-anyto</string>
<string>igo</string>
<string>igomarkto</string>
<string>fakegps</string>
<string>mockgps</string>
<string>pokeep</string>
</array>

また、実行時に以下の方法で追加のスキームを渡すことも可能です additionalMockAppUrlSchemes.

デベロッパーモードの検証

「Developer Mode Reality Check」セクション

AppleはiOSのDeveloper Modeの切り替え状態を読み取るための公開APIを提供していません。このプラグインは、デバッガのアタッチや開発用プロビジョニングのインジケーターといった間接的なヒューリスティックを使用しています。これらは確定的な証拠ではなく、あくまでリスク信号として扱ってください。

iMyFone AnyToのようなツールは、Developer ModeやApp Store外で配布される併用アプリに依存していることがよくあります。ネイティブ側のチェックとサーバー側の不正検知ルールを組み合わせて運用してください。

import { MockLocationDetector } from '@capgo/capacitor-mock-location-detector';
const result = await MockLocationDetector.analyze({
requestLocationSample: true,
additionalMockAppUrlSchemes: ['anyto', 'pokeep'],
});