2
我在iOS8中有位置更新的新問題。CLLocationManager位置更新通過WiFi?
在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接入點似乎已知,所以我很困惑。 有什麼想法?
看到這篇文章:http://stackoverflow.com/questions/12602463/didupdatelocations-instead-of-didupdatetolocation。無論如何,GPS不需要WIFI來獲取位置,但它確實需要空間才能被衛星看到。 – Rick 2014-11-02 14:13:48
這篇文章涉及iOS6。我從來不支持iOS 6,它始終在 – suMi 2014-11-02 14:16:29
之前工作。它應該自iOS 6起棄用! 'didUpdateLocations'更可靠。 – Rick 2014-11-02 14:21:50