【问题标题】:CLLocationManager location updating over wifi?CLLocationManager 通过 wifi 更新位置?
【发布时间】:2014-12-29 06:39:12
【问题描述】:

我在 iOS8 中遇到了位置更新的新问题。

viewDidAppear我打电话给我的位置经理:

//start location updating
locationManager = [[CLLocationManager alloc] init];
locationManager.delegate = self;
locationManager.desiredAccuracy = kCLLocationAccuracyBest;
[locationManager startUpdatingLocation];

但是这个无效

- (void)locationManager:(CLLocationManager *)manager didUpdateToLocation:(CLLocation *)newLocation fromLocation:(CLLocation *)oldLocation{
    currentLocation = newLocation;
}

永远不会被调用。 这很奇怪,我很确定当我还在芬兰时它仍然有效(使用我的蜂窝数据)。现在我在巴西旅行(只使用 wifi),我无法让它在这里工作,这很奇怪。我的 wifi 接入点似乎是已知的,所以我很困惑。 有什么想法吗?

【问题讨论】:

  • 查看这篇文章:stackoverflow.com/questions/12602463/…。无论如何,GPS 不应该需要 WIFI 来获取位置,但它确实需要开放空间才能被卫星看到。
  • 这篇文章与iOS6有关。我从不支持 iOS 6,它之前一直都可以使用
  • 它应该在 iOS 6 之后被弃用! didUpdateLocations 更可靠。
  • 改变了它,但也没有被调用

标签: ios cllocation


【解决方案1】:

问题的答案是关于 iOS8 如何处理位置更新的一些消息。这里有一篇很棒的帖子: http://nevan.net/2014/09/core-location-manager-changes-in-ios-8/

【讨论】:

    猜你喜欢
    • 2012-03-30
    • 1970-01-01
    • 2015-06-07
    • 1970-01-01
    • 1970-01-01
    • 2011-08-27
    • 1970-01-01
    • 2016-01-09
    相关资源
    最近更新 更多