【发布时间】:2016-04-01 06:37:37
【问题描述】:
有没有其他人遇到过告诉位置经理推迟更新但仍通过 didUpdateLocations 获得定期位置更新的问题?
我有:
已验证没有其他应用正在使用定位服务
从调试器和 MacBook 上拔下设备(通过将 didUpdateLocations 记录到文件来验证它是否仍在调用)
确保我的应用中只使用了一个 locationManager。
根据文件日志:
CoreLocation:完成延迟更新:成功
我认为没有什么问题,但 didUpdateLocations 仍然以 1Hz 的正常间隔调用。
如何检查延迟位置更新是否有效?
【问题讨论】:
-
来自苹果文档:
Deferred updates are delivered only when the system enters a low power state. Deferred updates do not occur during debugging because Xcode prevents your app from sleeping and thus prevents the system from entering that low power state.
标签: ios core-location