iOS 配置
复制包含安装步骤和该插件完整 Markdown 指南的配置 prompt。
- 适用于 iOS 15+
CLLocationSourceInformation.isSimulatedBySoftware - 宿主应用中的位置权限
- 建议使用真机以获得真实的 GPS 采样
Info.plist
标题为“Info.plist”的章节<key>NSLocationWhenInUseUsageDescription</key><string>We verify your location has not been spoofed.</string>用于检测您希望识别的伴随模拟应用的可选 URL schemes 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>你也可以在运行时通过以下方式传递额外的 schemes additionalMockAppUrlSchemes.
开发者模式现实检查
标题为“开发者模式现实检查”的章节Apple 未提供公开的 API 来读取 iOS 开发者模式开关。此插件使用间接启发式方法,例如调试器附加和开发配置描述文件指示器。请将其视为风险信号,而非确凿证据。
iMyFone AnyTo 等工具通常依赖开发者模式以及通过 App Store 之外渠道分发的配套应用。请结合原生检查与服务器端欺诈规则。
import { MockLocationDetector } from '@capgo/capacitor-mock-location-detector';
const result = await MockLocationDetector.analyze({ requestLocationSample: true, additionalMockAppUrlSchemes: ['anyto', 'pokeep'],});