概述
概述@capgo/capacitor-mock-location-detector 因为没有单一的OS标志可靠地检测工具如PoKeep或iMyFone AnyTo,所以它结合了多个独立的检查
核心功能
标题:核心功能analyze- 运行所有可用检查并返回一个评分的综合结果。runCheck- 执行一个命名的检测层。getCapabilities- 在当前平台上发现支持的检查。startMonitoring/stopMonitoring- 使用事件进行周期性分析。locationIntegrityChangedevents.openDeveloperSettings检查层
标题:检查层
检查ID| iOS | iOS | Android | 目的 |
|---|---|---|---|
system_mock_flag | ✅ | ✅ | 当前GPS定位的模拟标志 |
developer_options | — | ✅ | 开发者选项开启 |
developer_mode_indicators | ✅ | ✅ | 间接调试版检测 |
mock_location_app | ✅ | ✅ | 已知的伪造应用包或URL方案 |
adb_enabled | — | ✅ | USB调试开启 |
mock_provider_settings | — | ✅ | 已授予旧版模拟位置权限的应用 |
location_anomaly | ✅ | ✅ | 移动速度/瞬移检测 |
motion_correlation | ✅ | — | GPS移动不匹配加速计活动 |
simulator | ✅ | ✅ | 模拟器/模拟环境 |
- iOS 不公开一个公共的开发者模式 API。该插件仅使用 App Store 安全的 heuristics。
- 应用程序无法程序化地禁用开发者模式或模拟位置设置。
此参考资料是从 src/definitions.ts 在 capacitor-模拟位置检测器.