gpt4 book ai didi

ios - CLLocationManager 通过 wifi 更新位置?

转载 作者:行者123 更新时间:2023-12-01 16:37:39 27 4
gpt4 key购买 nike

我在 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/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com