【发布时间】: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