【问题标题】:IOS 8 : CLVisit in CoreLocationIOS 8:CoreLocation 中的 CVisit
【发布时间】:2014-11-23 19:13:42
【问题描述】:

我正在尝试在我的应用程序中使用新的 CLVisit 功能来监控用户的访问,我遵循 WWDC-14 视频并实现了所有内容,但 locationManager:didVisit 根本没有调用。我设置了 NSLocationAlwaysUsageDescription 键,在 Capabilities 中启用“位置更新”后台模式,并在我的班级的 ViewDidLoad 中包含以下内容:

_locationManager = [[CLLocationManager alloc] init];
_locationManager.delegate = self;
[_locationManager requestAlwaysAuthorization];
[_locationManager startMonitoringVisits];

没有关于停留在特定地点进行访问所需的最短时间或任何关于地点之间距离的任何文件。 我尝试使用 GPX 文件和在建筑物中测试它,方法是在不同的地方停留超过 10 分钟,但 locationManager:didVisit 委托没有被解雇。

请帮助我,如何测试 CLVisits,或者我是否遗漏了代码中的任何内容。

【问题讨论】:

    标签: ios8 core-location


    【解决方案1】:

    我一直在使用此代码测试 CLVisits,并且非常适合监控我的一天 https://github.com/steveschauer/TestCLVisit

    【讨论】:

      猜你喜欢
      • 2014-08-12
      • 1970-01-01
      • 2015-12-30
      • 2015-02-28
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2011-06-19
      • 2015-12-14
      相关资源
      最近更新 更多