我正在尝试使用延迟位置更新的新 iOS 6 功能,但不断收到此错误:
didFinishDeferredUpdatesWithError :Error Domain=kCLErrorDomain Code=11 “操作无法完成。(kCLErrorDomain 错误 11。)”
我正在使用以下代码:
- (DeviceAPI *) init
{
locationManager = [[CLLocationManager alloc] init];
[locationManager setDelegate:self];
[locationManager setDesiredAccuracy:kCLLocationAccuracyBest];
[locationManager startUpdatingLocation];
[locationManager allowDeferredLocationUpdatesUntilTraveled:(CLLocationDistance)100000 timeout:(NSTimeInterval)100000];
return self;
}
这个callback
功能:
- (void)locationManager: (CLLocationManager *) manager
didFinishDeferredUpdatesWithError:(NSError *)error
{
NSLog(@"didFinishDeferredUpdatesWithError :%@", [error description]);
}
有什么帮助吗?