【问题标题】:CoreLocation "significant location changes" vs. "region monitoring"CoreLocation“重大位置变化”与“区域监控”
【发布时间】:2013-07-04 00:43:43
【问题描述】:

目标:

我想要一款能够在用户靠近感兴趣的位置时向他们发送位置通知的应用。 (例如,“您在 XYZ 的 100 英尺范围内”)

核心位置文档强调使用-[CLLocationManager startMonitoringSignificantLocationChanges] 监控位置的低电池影响方式。这似乎不需要应用程序使用UIBackgroundModes 运行。

同样的事情也适用于区域监控吗?我想使用[CLLocationManager startMonitoringForRegion:]——我无法从文档中判断应用程序是否必须在后台运行才能接收地理围栏更新。我希望尽可能减少用户电池的消耗。

希望这是有道理的。

【问题讨论】:

    标签: ios core-location geofencing


    【解决方案1】:

    startMonitoringForRegion 正是您想要的。该应用不需要在后台运行,它会被唤醒以处理来自操作系统的任何更新。

    【讨论】:

      猜你喜欢
      • 2012-06-11
      • 2012-03-22
      • 2016-08-30
      • 2013-06-07
      • 2012-11-10
      • 1970-01-01
      • 2014-04-19
      • 1970-01-01
      • 2013-02-03
      相关资源
      最近更新 更多