ios - CLLocationManager 通过 wifi 更新位置?

标签 ios cllocation

我在 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 接入点似乎是已知的,所以我很困惑。
有任何想法吗?

最佳答案

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

关于ios - CLLocationManager 通过 wifi 更新位置?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26700146/

相关文章:

ios - 将 CLLocationCoordinate2D 放入 Swift 的 CLLocation

ios - 从 SOAP api 调用检索 json

ios - 有没有办法在有人进行应用内购买时收到通知?

objective-c - 无法重现 App Store 审核期间发生的崩溃 [区域设置问题]

ios - 如何将参数传递给 NSNotificationCenter 中的选择器?

iOS 地理位置(总是返回该位置在英国伦敦)

ios - 如何在 UIViewController 消失时停止位置管理器

swift - 在 mapView 中为 CLLocation 数组绘制路线(Swift)

ios - 快速计算行程距离核心位置

objective-c - 写入plist的问题