iOS 设置
复制一个包含安装步骤和本插件的完整Markdown指南的设置命令。
- iOS 15+
CLLocationSourceInformation.isSimulatedBySoftware - iOS 设备位置权限
- 建议使用物理设备来实现更现实的 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>您也可以在运行时通过 additionalMockAppUrlSchemes.
开发者模式 Reality Check
开发者模式 Reality Check苹果公司不提供公共 API 来读取 iOS 开发者模式开关。该插件使用间接的 heuristics,如调试器附加和开发环境配置文件指示器。将它们视为风险信号,而不是证据。
工具如 iMyFone AnyTo 经常依赖于开发者模式和 App Store 之外分发的伴侣应用。结合本地检查和服务器端欺诈规则。
示例
示例部分import { MockLocationDetector } from '@capgo/capacitor-mock-location-detector';
const result = await MockLocationDetector.analyze({ requestLocationSample: true, additionalMockAppUrlSchemes: ['anyto', 'pokeep'],});