@capgo/capacitor-mock-location-detector 因为没有单个的 OS 标志可靠地检测工具如 PoKeep 或 iMyFone AnyTo,所以它结合了多个独立的检查。
analyze- 运行所有可用检查并返回一个评分的综合结果。runCheck- 执行一个命名的检测层。getCapabilities- 在当前平台上发现支持的检查。startMonitoring/stopMonitoring- 使用locationIntegrityChanged事件进行周期性分析。openDeveloperSettings- 打开最佳努力设置屏幕以便用户可以禁用开发者或模拟工具。
Check Layers
Check Layers| Check ID | iOS | Android | 目的 |
|---|---|---|---|
system_mock_flag | ✅ | ✅ | __CAPGO_KEEP_0__ |
developer_options | — | ✅ | Android 开发者选项已启用 |
developer_mode_indicators | ✅ | ✅ | 间接开发/调试构建的启发式 |
mock_location_app | ✅ | ✅ | 已知的欺骗应用包或 URL 方案 |
adb_enabled | — | ✅ | USB 调试已启用 |
mock_provider_settings | — | ✅ | 已授予遗留 mock-location 权限的应用 |
location_anomaly | ✅ | ✅ | 不可能的移动速度/瞬移启发式 |
motion_correlation | ✅ | — | GPS 运动没有匹配的加速计活动 |
simulator | ✅ | ✅ | 模拟器/模拟器环境 |
重要限制
重要限制- iOS 不暴露公共开发者模式 API。该插件仅使用 App Store 安全的 heuristics。
- 应用程序无法编程地禁用开发者模式或模拟位置设置。
真实来源
标题为“真实来源”此参考资料是从 src/definitions.ts 在 capacitor-模拟位置检测器.