跳过内容

iOS 设置

GitHub
  • iOS 15+ CLLocationSourceInformation.isSimulatedBySoftware
  • 在主应用中获取位置权限
  • 建议使用物理设备进行真实的GPS采样

Info.plist

Info.plist
<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>

开发者模式Reality Check additionalMockAppUrlSchemes.

开发者模式Reality Check

开发者模式 reality 检查

Apple does not provide a public API to read the iOS Developer Mode toggle. This plugin uses indirect heuristics such as debugger attachment and development provisioning indicators. Treat them as risk signals, not proof.

示例

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