iOS 配置
复制一条配置 prompt,包含安装步骤和该插件的完整 Markdown 指南。
- 需 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'],});